haithamedrees23
12-13-2010, 04:39 PM
i have 2 li and each of them should hold 2 right floated divs , but the are not expanded to hold the divs properly as shown in the screenshot in the url below
http://rapidshare.com/files/436706262/li_issue.jpg
the HTML code is <div class="anothernews">
<ul>
<li><div><img src="Images/smallimg.jpg" /> </div>
<div><p><a href="#">4221 حالة إصابة مكتشفة بالإيدز فى مصر
</a></p></div>
<div class="clear"></div>
</li>
<li><div><img src="Images/smallimg.jpg" /> </div>
<div><p><a href="#">4221 حالة إصابة م
كتشفة بالإيدز فى مصر
</a></p></div>
<div class="clear"></div>
</li>
<div class="clear"></div>
</ul>
<div class="clear"></div>
</div><!--end of anothernews div-->
The CSS code
.anothernews{ width:230px; float:right; margin-right:15px}
.anothernews li{ list-style:none; width:100%; border:1px solid #000000; height:100%;}
.anothernews li div{ float:right; width:48% }
.anothernews li div+div{ margin-right:8px}
http://rapidshare.com/files/436706262/li_issue.jpg
the HTML code is <div class="anothernews">
<ul>
<li><div><img src="Images/smallimg.jpg" /> </div>
<div><p><a href="#">4221 حالة إصابة مكتشفة بالإيدز فى مصر
</a></p></div>
<div class="clear"></div>
</li>
<li><div><img src="Images/smallimg.jpg" /> </div>
<div><p><a href="#">4221 حالة إصابة م
كتشفة بالإيدز فى مصر
</a></p></div>
<div class="clear"></div>
</li>
<div class="clear"></div>
</ul>
<div class="clear"></div>
</div><!--end of anothernews div-->
The CSS code
.anothernews{ width:230px; float:right; margin-right:15px}
.anothernews li{ list-style:none; width:100%; border:1px solid #000000; height:100%;}
.anothernews li div{ float:right; width:48% }
.anothernews li div+div{ margin-right:8px}