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
Can I have two different text decorations (ect) on the same page?
Old 08-03-2009, 05:30 AM Can I have two different text decorations (ect) on the same page?
eichSii's Avatar
Novice Talker

Posts: 11
Name: Lyric
Trades: 0
I have this:
Code:
a:link { text-decoration: none; color: #B6B6B6; font-size: large;}
a:visited { text-decoration: none; color: #B6B6B6; font-size: large;}
a:active { text-decoration: none; color: #B6B6B6; font-size: large;}
a:hover { text-decoration: underline; color: black; font-weight: bold}
in my CSS.
Now I have a picture on my page that I need to be a link, also. But I don't want any hover, visited, or active affects on it. How can I make two different codes like that on one page, and how do I justify which is which?
(Note: both the image, and links i have are in Div's)
__________________
Ah yes. Endless mind malfunction.
eichSii is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-03-2009, 06:10 AM Re: Can I have two different text decorations (ect) on the same page?
carterdea's Avatar
Ultra Talker

Posts: 353
Location: Arizona
Trades: 0
img a:hover {text-decoration: none;}

You might wanna add a "border:none" in there too.

Also, usability isn't great if links aren't blue and underlined, but enough sites do funky links, you might be able to get away with it.
__________________

Please login or register to view this content. Registration is FREE
carterdea is offline
Reply With Quote
View Public Profile Visit carterdea's homepage!
 
Old 08-03-2009, 06:26 AM Re: Can I have two different text decorations (ect) on the same page?
eichSii's Avatar
Novice Talker

Posts: 11
Name: Lyric
Trades: 0
Quote:
Originally Posted by carterdea View Post
img a:hover {text-decoration: none;}

You might wanna add a "border:none" in there too.

Also, usability isn't great if links aren't blue and underlined, but enough sites do funky links, you might be able to get away with it.
It didn't work. Is there something I have to add to my HTML coding? I have an external CSS coding.
__________________
Ah yes. Endless mind malfunction.
eichSii is offline
Reply With Quote
View Public Profile
 
Old 08-03-2009, 09:44 AM Re: Can I have two different text decorations (ect) on the same page?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
You should NEVER remove the underline from links, except perhaps in navigation menu where it's obvious that they are links. Removing the underline is bad for accessibility, you should not make people GUESS something is a link and you should definitely not rely on color alone to designate a link - some people with color blindness may not be able to differentiate your colors.
Quote:
How can I make two different codes like that on one page
Make a separate class for that element you want to be different and apply that class to the element in your HTML.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

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


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

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-05-2009, 11:23 PM Re: Can I have two different text decorations (ect) on the same page?
pdjprateek's Avatar
Experienced Talker

Posts: 38
Name: Prateek Jain
Location: India
Trades: 0
Correcting carterdea , since the img tag comes inside the a tag
it should be

a:hover img { text-decoration: none };

and so on,

I hope this helps.

Or better, as LadynRed says add a class to it. you can try this out.

a.classname:hover { text-decoration:none ; }

<a class="classname" href=""><img></a>

Again, i hope this helps

Prateek,
PDJSolutions
pdjprateek is offline
Reply With Quote
View Public Profile Visit pdjprateek's homepage!
 
Reply     « Reply to Can I have two different text decorations (ect) on the same page?
 

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.30012 seconds with 12 queries