homepage Welcome to WebmasterWorld Guest from 54.163.72.86
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
anchor border and container div width- IE issue
poonkave




msg:4419512
 11:08 am on Feb 20, 2012 (gmt 0)
below is the extracted code to show an issue in IE only.
I am expecting border for <a> but top border is not visible in IE if container div got width sepcified.
Kept css inline for easy replication.

[code]<div style="width:100px;">
<ul style='border-bottom:1px solid #778;'>
<li style="list-style:none;margin:0;display:inline;">
<a href="#" style='border:1px solid green;text-decoration:none'>Item one</a>
</li>
</ul>
</div>[/code]

 

rocknbil




msg:4419595
 5:27 pm on Feb 20, 2012 (gmt 0)

Welcome aboard poonkave, but you may have to change the display of the anchor to block or inline-block. Right now it's default, inline, so it really has no "height" so won't have a border-top.

This presents another problem. A block element inside an inline element (the LI's) is bound to create more issues, moving forward you may have to change the layout of the LI's.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved