Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
change the underline color
Old 11-23-2006, 12:59 AM change the underline color
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
Is there a way to make the link one color and the underline another color?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-23-2006, 01:29 AM Re: change the underline color
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
a {
text-decoration: none;
color: #0000FF;
border-bottom: 1px solid #FF0000;
}
Replace the hex values as needed.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 11-23-2006, 12:16 PM Re: change the underline color
lunchbox170's Avatar
Extreme Talker

Posts: 151
Name: Ben
Trades: 0
yeah that would work, why didnt I think of that?

Thanks
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
lunchbox170 is offline
Reply With Quote
View Public Profile
 
Old 06-01-2007, 11:19 AM Re: change the underline color
Junior Talker

Posts: 1
Name: Chad
Trades: 0
Hey - Thanks for that response. I was searching the web for this scenario and found your guys thread - It saved me a some time and will give me the effect I need to "underline" the link in the color I choose.

What a slick solution!

Thanks !!

BTW - I registered in this board just to say thanks for the solution!

Did I say THANKS!
chadm is offline
Reply With Quote
View Public Profile
 
Old 06-01-2007, 11:32 AM Re: change the underline color
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
You're welcome, Chad. But feel free to participate in the other threads too.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 09-08-2007, 12:09 PM Re: change the underline color
danfinney's Avatar
Average Talker

Posts: 22
Name: Dan Finney
Trades: 0
I used this method on a site, but I ran into a snag. This also underlines images that are linked.

at first I tried this:

a img, a:link img {
border:0;
}

But that does not work because the underline is happening to the "a:link" not the image inside the link. I came up with a good temporary solution:

a img, a:link img {
border:0;
margin-bottom:-4px; /* this hides the 1px border under a:link */
}

This would obviously not work on an icon with a transparent background. Currently there aren't any images on the site with transparent backgrounds, but I still feel that this is a hack and not a real solution to the problem.

Is there a selector that will just target the text inside the link? (to apply the underline)

Please don't give suggestions like "wrap all of your text links in a span tag or a div tag." The site is several hundred pages deep and the client controls the site with a CMS.

Thanks for your help!
__________________
d a n f i n n e y

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Last edited by danfinney; 09-09-2007 at 08:13 AM..
danfinney is offline
Reply With Quote
View Public Profile Visit danfinney's homepage!
 
Old 09-08-2007, 12:16 PM Re: change the underline color
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
img {
border: 0;
}
joder is offline
Reply With Quote
View Public Profile
 
Old 09-08-2007, 12:22 PM Re: change the underline color
danfinney's Avatar
Average Talker

Posts: 22
Name: Dan Finney
Trades: 0
LOL joder, nice joke.

Ok, found the spec for text-underline-color in CSS3, but that would probably mean leaving out MicroSnot Internet Destroyer.
__________________
d a n f i n n e y

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
danfinney is offline
Reply With Quote
View Public Profile Visit danfinney's homepage!
 
Old 09-08-2007, 12:34 PM Re: change the underline color
joder's Avatar
Flipotron

Posts: 6,442
Name: James
Location: In the ocean.
Trades: 0
What is so funny about it?
http://css-discuss.incutio.com/?page=LinkedImages
joder is offline
Reply With Quote
View Public Profile
 
Old 09-08-2007, 01:13 PM Re: change the underline color
danfinney's Avatar
Average Talker

Posts: 22
Name: Dan Finney
Trades: 0
Quote:
Originally Posted by danfinney View Post
But that does not work because the underline is happening to the "a:link" not the image inside the link.
Sorry, thought you were making a joke. Didn't know you were serious.
__________________
d a n f i n n e y

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
danfinney is offline
Reply With Quote
View Public Profile Visit danfinney's homepage!
 
Old 09-08-2007, 09:38 PM Re: change the underline color
danfinney's Avatar
Average Talker

Posts: 22
Name: Dan Finney
Trades: 0
Just tested the "margin-bottom:-4px" in Internet Destroyer. No dice. That solution only holds up in Safari & Firefox. Does anyone out there have a solution that will make this work with linked images? ADAM? You are being awfully quiet. Come on, put that massive Talkupation to work!
__________________
d a n f i n n e y

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
danfinney is offline
Reply With Quote
View Public Profile Visit danfinney's homepage!
 
Old 09-09-2007, 12:27 PM Re: change the underline color
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Code:
a.no-border {
     border:  none;
}
img {
     border:  none;
}
...
<a href="something" class="no-border"><img src="your image" blah blah blah /></a>
It's not pretty, but it should work.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)

Last edited by ADAM Web Design; 09-09-2007 at 12:29 PM..
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 09-09-2007, 12:29 PM Re: change the underline color
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
ADAM? You are being awfully quiet. Come on, put that massive Talkupation to work!
It's only been 20 hours or so as I write this and it is a weekend of course, and occasionally we do have a life
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-09-2007, 12:30 PM Re: change the underline color
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Ain't that typical !!!!
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-09-2007, 12:50 PM Re: change the underline color
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Yeah, your timing sucks.

Seriously, I was out all day Saturday. That's my excuse.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Old 09-09-2007, 01:17 PM Re: change the underline color
danfinney's Avatar
Average Talker

Posts: 22
Name: Dan Finney
Trades: 0
What is this life that you speak of?
__________________
d a n f i n n e y

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
danfinney is offline
Reply With Quote
View Public Profile Visit danfinney's homepage!
 
Old 09-09-2007, 01:20 PM Re: change the underline color
danfinney's Avatar
Average Talker

Posts: 22
Name: Dan Finney
Trades: 0
Quote:
Originally Posted by ADAM Web Design View Post
Code:
<a href="something" class="no-border"><img src="your image" blah blah blah /></a>
It's not pretty, but it should work.
If this were a static website, I would be all over it. This site is hundreds of pages deep and the client uses a CMS. Looks like I will have to use a different effect until CS3 specs are supported by IE 22.
__________________
d a n f i n n e y

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
danfinney is offline
Reply With Quote
View Public Profile Visit danfinney's homepage!
 
Old 09-09-2007, 01:32 PM Re: change the underline color
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
Sorry, Dan. I got nothin'.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to change the underline color
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.49748 seconds with 12 queries