Search code examples
csshtmlbutton

How to make a button stretch across the width of a column


I'm trying to make a button span the width of a column.

e.g. here: http://davidnhutch.com. Notice how the light grey buttons are only as large as the text they contain? I'd like each button to span the width of that column, but can't for the life of me figure out how to do it. I've done quite a bit of looking around but am still kinda new to this.

Any ideas?


Solution

  • You will have to make them block elements to be able to set a width:

    .button {
        display: block;
        width: 100%;
    }