Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Making horizontal boxes


lucy24 - 10:11 pm on Nov 7, 2012 (gmt 0)


Doing it with floats is one way: left, right and default. Another way is to make three divs set to {display: inline-block} with a specified width, and pack all three inside a single bigger block.

The widths have to add up to less than 100% even if you've ruthlessly cut out all margins, padding and borders. Don't ask me why; I just know what doesn't work.

Make sure you think about what will happen if the viewport isn't wide enough to hold all three of your boxes with their content.


Thread source:: http://www.webmasterworld.com/css/4517016.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com