Welcome to WebmasterWorld Guest from 35.173.47.43

Forum Moderators: not2easy

Message Too Old, No Replies

Making horizontal boxes

     
4:45 pm on Nov 7, 2012 (gmt 0)

New User

5+ Year Member

joined:Nov 7, 2012
posts:3
votes: 0



System: The following 2 messages were cut out of thread at: http://www.webmasterworld.com/html/4510047.htm [webmasterworld.com] by bill - 3:09 pm on Nov 8, 2012 (jst +9)


I want to have 3 boxes aligned horizontal with css.

Do I have to make a float left and float right box first, and in one of the floats put again a floatleft and float right?

Or,

is it possible to have 3 divs aligned in such way that they are aligned next to each other?

A tip or start is helpful :-)
10:11 pm on Nov 7, 2012 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 9, 2011
posts:15810
votes: 848


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.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members