Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-11-2008, 04:45 PM   PM User | #1
dominoeffect
New to the CF scene

 
Join Date: Jan 2008
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
dominoeffect is an unknown quantity at this point
Question Simple but tricky header / link styling question

Hey all,

I have a seemingly simple problem with my link and header styles that I keep thinking had a really obvious solution which I can't see, so maybe it will be glaringly obvious to someone on here!

Notes: I'm a bit of a css beginner and I'm using Wordpress on my site.

I want to style the link-attributes of a specific <h3> tag so it won't underline when hovered. (the current hover-decoration is specified in the overall a: styles of the website).

Only thing is that I can't use a link class because the <h3> tag has only <?php the_category(', ') ?> inside, which displays and links to the relevent categories of a blog post.

So how can I style the link without creating a link class??

Appreciate anyone's thoughts on this,

Cheers!
dominoeffect is offline   Reply With Quote
Old 01-11-2008, 04:50 PM   PM User | #2
Excavator
Master Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 9,410
Thanks: 22
Thanked 1,765 Times in 1,749 Posts
Excavator has a spectacular aura aboutExcavator has a spectacular aura aboutExcavator has a spectacular aura about
Hello dominoeffect,
h3 in your header could be styled with #header h3 {...} if it's the only one. Make it h5 or something if there are other h3's that you don't want affected.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is offline   Reply With Quote
Old 01-11-2008, 04:56 PM   PM User | #3
dominoeffect
New to the CF scene

 
Join Date: Jan 2008
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
dominoeffect is an unknown quantity at this point
Hey Excavator thanks for the help buddy.

Is it possible to style the header's link attributes this way (hover,etc), and not just the size,color,etc of the header?
dominoeffect is offline   Reply With Quote
Old 01-11-2008, 04:59 PM   PM User | #4
Apostropartheid
The Apostate


 
Apostropartheid's Avatar
 
Join Date: Oct 2007
Posts: 3,215
Thanks: 16
Thanked 265 Times in 263 Posts
Apostropartheid is on a distinguished road
Yes.
Code:
#header h3 a {
    /* default properties */
}
#header h3 a:hover {
    /* hover properties...and so on. */
}
__________________
Blog | Twitter
Useful links: W3C HTML Validator | W3C CSS Validator | HTML 5 Guide
CF: HTML & CSS Resources/Tutorials Thread | HTML & CSS Posting Rules and Guidelines
Remember: no link, no code, no help!
Apostropartheid is offline   Reply With Quote
Users who have thanked Apostropartheid for this post:
dominoeffect (01-11-2008)
Old 01-11-2008, 05:39 PM   PM User | #5
dominoeffect
New to the CF scene

 
Join Date: Jan 2008
Posts: 5
Thanks: 1
Thanked 0 Times in 0 Posts
dominoeffect is an unknown quantity at this point
Ah, thank you very muchly.

I knew it was staring me in the face!
dominoeffect is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 03:40 PM.


Advertisement
Log in to turn off these ads.