Bootstrap Alert Size Change

alert, css, twitter-bootstrap

Solution

Using some `CSS`

.alert {
   width:40%;    
}

Example

http://www.bootply.com/96921

The example above makes the alert width 40% of the container, or in this case the screen.

You can also set a fixed width.

.alert {
   width:300px;    
}

Problem

Is there a way I could edit how far an alert could stretch across the page, so it doesn't go all the way across? Here's an example of my alerts: ``` <div class="alert alert-success">Your first number was correct.</div> ```

Original source