简体   繁体   中英

Why right side div is not side by side with the left side div?

I have a page on which I have a lot of divs and something I did (can't figure out what it is) is making the right side div appear below the right side div.

Here is an example page: http://www.problemio.com/problems/problem.php?problem_id=223

I am staring at this thing with firebug, but can't figure out why this is happening. I even made the width of the left div much narrower, but still the right side div is not lining up next to the left side div.

Any idea what the problem is?

Thanks!!

The <div> with the float:right style is currently inside the <div> with with the float:left style (that may be the change you made). Just move the <div> you want to float right out of there and make it the immediate sibling of the left floated <div>

You HTML is incorrect. The right div is inside the left div. Check your markup.

.half_text is 650px, the first div is 120px while the second div is 575px. Try setting the second's width to 530px. In #suggestions it looks like the right side shouldn't be more than 450px.

Hope this helps.

        ....  
        ....
        </div> <!-- Closes tabs div -->
        </div> <!-- Closes left div -->
         </div>      < ----  Here you need a closing div tag and the right menu goes up.

<div style="float: right; width: 225px;">
....  
........  
 ....

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM