I have a horizontal div which is inside my header and is the width of my header. In this div I want to put 3 other divs of different sizes and line them all up together. I've tried everything and they keep falling outside the horizontal div.
It would seem that I could just use floats, but they wouldn't work. The three divs are represented in the image by black, pink and white backgrounds. They are enclosed in login-breaking and are named login, search and breaking-marquee The site is down right now while I get this working but if you need to see it live I can open it up for you.
Doing some testing with just the header parts and when I make then enclosing div at least 1500px, everything fits in accordingly, but doesn't squeeze to the left. Also, I checked the sizes of all the divs and they equal 1024 so it's not like it's too big for the enclosing div. This is crazy!
It would seem that I could just use floats, but they wouldn't work. The three divs are represented in the image by black, pink and white backgrounds. They are enclosed in login-breaking and are named login, search and breaking-marquee The site is down right now while I get this working but if you need to see it live I can open it up for you.
Here's my header section:
Here's an image of what it looks like:
divprobs
Here's the html:
float:left;.Here's what happens after I float them left: http://www.stfuandplay.com/index.php
Doing some testing with just the header parts and when I make then enclosing div at least 1500px, everything fits in accordingly, but doesn't squeeze to the left. Also, I checked the sizes of all the divs and they equal 1024 so it's not like it's too big for the enclosing div. This is crazy!
This is a quick explanation but basically it's just a lot easier and semantic than how it's been done in the past.
these do not compile properly at chrome need help any help will be so kind of you
@shanewatson71 I don't understand your problem.
What doesn't compile? Chrome doesn't need the shiv/shim...only IE.
Clearfix them with a Empty clearfix div
@Musama Actually, that's a very old technique and there are much better options available.
See here: http://css-tricks.com/snippets/css/clear-fix/