Page 1 of 1

<a> tags in CSS

Posted: Thu Oct 08, 2009 10:13 am
by fried
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too.


I inherited this piece of code which works fine in Firefox, however in IE it doesn't show the link at all. I'm sure it's a syntax problem but I've validated both this and the HTML. If it helps I'll post the HTML. Thanks.

Code: Select all

a.info {
    position: relative;
    color: #000;
    text-decoration: none;
    font-size: 10px;
 
}
 
a.info span {
 
   display: none;
 
}
 
a.info:hover {
    background: none;
    z-index: 500;
    color: #F30;
 
}
 
a.info:hover span {
    text-align: center;
    display: inline;
    position: absolute;
    white-space: nowrap;
    top: -20px;
    left: 20px;
    background: #777777;
    color: #FFFFFF;
    padding: 3px;
    border: 1px solid #1ca1cd;
    border-left: 5px solid #1ca1cd;
    overflow: visible;
}

pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too.

Re: <a> tags in CSS

Posted: Thu Oct 08, 2009 10:23 am
by pickle
Hard to tell without seeing a screenshot or something. I'd suggest taking out all the definitions but the first one & see if that fixes it. If it does, add the second definition back & check, then the third, etc, until you find what/why it's not showing up.

Re: <a> tags in CSS

Posted: Fri Feb 12, 2010 12:24 pm
by social_experiment
Could you please paste the html code pertaining to this. I guesstimated from your style sheet what the html should look like and if it is like the following :

Code: Select all

<span><a class="info" href="#">Link</a></span>
it displays no problems in I.E 7.

Re: <a> tags in CSS

Posted: Fri Feb 12, 2010 10:00 pm
by daedalus__
well it doesn't display because the text is wrapped in the span tag and the span tag is set to display none.

you need to strip the unnecessary attributes from the a class. you probably shouldn't have a class called info anyway.

if you post the markup and css that is pertinent to the problem ill fix it after i make you understand what the problem is.
:)