Reputation: 11828
Having a bit of trouble here. I have 4 DIVs. I want them to be positioned like so:
So, I floated DIV 1 to the left and floated DIV 4 to the right. So far so good. However, when I include DIVs 2 and 3, everything starts breaking. Depending on how I order the DIVs in my HTML, sometimes they don't show up at all, are on the next line, are out of order, etc. It's all getting quite confusing. I don't see a float:center;
CSS code so I'm not exactly sure how to do this.
Some assistance would be much appreciated! Thanks.
Upvotes: 3
Views: 45
Reputation: 1990
There is no float:center and floating one to the left and another to the right does not leave the rest going to the middle. You have to choose between what to float to the right and what to the left.
In your case I think floating 1 to the left and 2,3 and 4 to the right would do the job.
Upvotes: 1
Reputation: 18379
How about setting each of the div's css display to inline, and wrapping with an outer div (display block). You'd also want to set widths...
Upvotes: 0