HTML CSS examples for CSS Form:input button layout
Buttons to fill width of container
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .container {<!-- w w w . j a v a 2s .c o m--> width: 600px; background: yellow; } .button { display: inline-block; height: 45px; padding: 0 30px; color: #555; text-align: center; font-weight: 700; line-height: 45px; letter-spacing: .01rem; text-decoration: none; white-space: nowrap; background-color: transparent; border-radius: 4px; border: 1px solid darken($GRAY, 10%); font-size: em(13); cursor: pointer; box-sizing: border-box; background: teal; width: 33.33333333%; } .button-group { position: relative; width: 100%; display: inline-block; list-style: none; padding: 0; margin: 0; /* IE hacks */ zoom: 1; *display: inline; } .button-group li { float: left; padding: 0; margin: 0; } .button-group .button { display: inline-block; box-sizing: border-box; } .button-group > .button:not(:first-child):not(:last-child), .button-group li:not(:first-child):not(:last-child) .button { border-radius: 0; } .button-group > .button:first-child, .button-group li:first-child .button { margin-left: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; } .button-group > .button:last-child, .button-group li:last-child > .button { border-top-left-radius: 0; border-bottom-left-radius: 0; } </style> </head> <body> <div class="container"> <div class="button-group"> <a class="button">Test Uno</a> <a class="button">Test Dos</a> <a class="button">Test Tres</a> </div> </div> </body> </html>