Can I control the color of the underline for a link?
Thanks!a {
text-decoration:none;
border-bottom:1px solid red;
}Nice but it doesn't work on IE, why's that?a {
text-decoration: none;
border-bottom: 1px solid #FF0000;
}
That's hardly any different, but maybe IE'll recognize it.I see.
Thanks guys!Oh, one thing I saw yesterday about the underline made with the border-bottom property... Might be usefull...
If you use that for a a:hover and no underline for the normal a, then, it could slow down the browser. That's because the css needs to redefine the element with the new property.
What you can do to avoid that ( if it becomes a problem ) is set :
a:link {
border-bottom: 1px solid #FFFFFF;
text-decoration: none;
}
a:hover {
border-bottom: 1px solid #FF0000;
text-decoration: none;
}
I thought that could be of general interest...
I can provide the link to that great website where it's explained, but I'll have to be at home ( bookmarks... )Ok... I've sorted out that not-working-in-IE thing. You need to add 'display:inline-block;'. Like this : a {
text-decoration: none;
border-bottom: 1px solid red;
display:inline-block;
}BTW, now that I'm a t home, here is the link for the article on the border-bottom property...
<!-- m --><a class="postlink" href="http://www.maratz.com/blog/archives/2005/05/08/speed-up-border-bottom-under-links/">http://www.maratz.com/blog/archives/200 ... der-links/</a><!-- m -->
BonRouge, are you sure it doesn't work in IE ?
Because I use border-bottom, and exactly like it's written in my post, and it's working fine in IE, Opera, IE mac, FF mac and pc and Netscape..BonRouge, are you sure it doesn't work in IE ?
Because I use border-bottom, and exactly like it's written in my post, and it's working fine in IE, Opera, IE mac, FF mac and pc and Netscape..
Well, it wasn't working for me until I added 'display:inline-block;'. I don't know - maybe there's another variable you/I/we haven't taken into account...Well, it wasn't working for me until I added 'display:inline-block;'. I don't know - maybe there's another variable you/I/we haven't taken into account...
maybe... which version of explorer are you using ? ( I'm using IE 6, that might be why it worked for me... )IE6 Sp2...
Do you have a valid DTD on your page?I have the html 4.01 strict.
It must be something else, but I'd like to know what. because of course, I'd like my links to work in every browser...
Thanks!a {
text-decoration:none;
border-bottom:1px solid red;
}Nice but it doesn't work on IE, why's that?a {
text-decoration: none;
border-bottom: 1px solid #FF0000;
}
That's hardly any different, but maybe IE'll recognize it.I see.
Thanks guys!Oh, one thing I saw yesterday about the underline made with the border-bottom property... Might be usefull...
If you use that for a a:hover and no underline for the normal a, then, it could slow down the browser. That's because the css needs to redefine the element with the new property.
What you can do to avoid that ( if it becomes a problem ) is set :
a:link {
border-bottom: 1px solid #FFFFFF;
text-decoration: none;
}
a:hover {
border-bottom: 1px solid #FF0000;
text-decoration: none;
}
I thought that could be of general interest...
I can provide the link to that great website where it's explained, but I'll have to be at home ( bookmarks... )Ok... I've sorted out that not-working-in-IE thing. You need to add 'display:inline-block;'. Like this : a {
text-decoration: none;
border-bottom: 1px solid red;
display:inline-block;
}BTW, now that I'm a t home, here is the link for the article on the border-bottom property...
<!-- m --><a class="postlink" href="http://www.maratz.com/blog/archives/2005/05/08/speed-up-border-bottom-under-links/">http://www.maratz.com/blog/archives/200 ... der-links/</a><!-- m -->
BonRouge, are you sure it doesn't work in IE ?
Because I use border-bottom, and exactly like it's written in my post, and it's working fine in IE, Opera, IE mac, FF mac and pc and Netscape..BonRouge, are you sure it doesn't work in IE ?
Because I use border-bottom, and exactly like it's written in my post, and it's working fine in IE, Opera, IE mac, FF mac and pc and Netscape..
Well, it wasn't working for me until I added 'display:inline-block;'. I don't know - maybe there's another variable you/I/we haven't taken into account...Well, it wasn't working for me until I added 'display:inline-block;'. I don't know - maybe there's another variable you/I/we haven't taken into account...
maybe... which version of explorer are you using ? ( I'm using IE 6, that might be why it worked for me... )IE6 Sp2...
Do you have a valid DTD on your page?I have the html 4.01 strict.
It must be something else, but I'd like to know what. because of course, I'd like my links to work in every browser...