-2

I always struggle a bit when it comes to positioning divs. This is what I would like to have, fitting the whole page, without any margin or padding:

 ____  __  __
|    ||__||__|
|____||__||__|
 ____________
|____________|

With the drawing above in mind, this is what I want to accomplish: https://i.stack.imgur.com/VE9Ad.jpg

1 Answer 1

0

Looks like you want something like this:

<div class="horizontal_container">
   <div></div>
   <div></div>
   <div></div>
</div>
<div></div>

with the associated style:

div.horizontal_container div {
    display: inline-block;
}

By default, divs are block level elements, but the inline-block display style will allow the three inner divs to appear next to each other.

1
  • Thanks for your reply. I've attached an image in my original post, this will clearify a bit.
    – canaQ
    Sep 20, 2013 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.