Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Having some trouble positioning these DIVs

Having a bit of trouble here. I have 4 DIVs. I want them to be positioned like so:

enter image description here

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.

like image 510
Ryan Peschel Avatar asked Dec 03 '25 15:12

Ryan Peschel


1 Answers

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.

like image 61
monokh Avatar answered Dec 06 '25 03:12

monokh