views:

87

answers:

2

I have a main div, and inside it..I have 2 divs, both left aligned.

For some reason(or property), when I drag the right of my firefox to make the browser smaller, the 2nd div goes on to the second line.

I would like this div to stay on the first line, instead of jumping down a line. How can I do that?

I am assuming overflow property?

+5  A: 

This is happening because there is not enough horizontal room for your divs to display side-by-side.

you need to make sure your outer div has a fixed width if your two inner-divs have fixed widths.

Do you have a link to what you are talking about?

Robert Greiner
+1  A: 

It's a property (and a particularly nice one) of floating elements. You should be able to solve it with specifying style="width:[NUM]%;" instead of using fixed widths.

Imho, fixed widths are really only mixable with scalable sites if they're particularly small in relation to their parent element, or will move out of the way of other stuff.

amphetamachine