user1438003 user1438003 - 6 months ago 10
HTML Question

Making button go full-width?

I want a button to take up the full width of the column, but having difficulties...

<div class="span9 btn-block">
<button class="btn btn-large btn-block btn-primary" type="button">Block level button</button>
</div>


How do I make the button as wide as the column?

Answer

This is a quick and dirty example. Basically, combine "display: block" with "width: 100%" in your CSS. I tested in IE9 and Chrome 21.

<html>

<div style="background-color: black">

<button style="display: block; width: 100%;">button</button>

</div>

</html>
Comments