开发者

Issue in div's floats right in IE7

开发者 https://www.devze.com 2023-04-12 17:36 出处:网络
i have a problem in html and css. that\'s,check the div is in the below order <div class=\"parent\">

i have a problem in html and css. that's,check the div is in the below order

<div class="parent">
   <div class="child1">
   </div>
   <div class="child2">
   </div>
</div>

.child1 { float:right; width:auto; }
.child2 { float:right; width:200px; }

in this the div child1 is a horizontal growing div. so its not possible to add specific width to the div. what i need to show the child1 and child2 div in same horizontal line. if child1 is empty the child2 will be the rightmost div. the above solution don't work in ie7. please help me to find a solution.

please check this image.

Issue in div's floats right in IE7

thanks in advance.


swap their order in the html.

Rigth floats are "inverted".

like this:

<div class="parent">
   <div class="child2">
   </div>
   <div class="child1">
   </div>
</div>


may be you have to define standard doctype like this <!DOCTYPE html> in your html page

0

精彩评论

暂无评论...
验证码 换一张
取 消