Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    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!

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,695
    Thanks
    22
    Thanked 1,832 Times in 1,816 Posts
    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

  • #3
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    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?

  • #4
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Yes.
    Code:
    #header h3 a {
        /* default properties */
    }
    #header h3 a:hover {
        /* hover properties...and so on. */
    }

  • Users who have thanked Apostropartheid for this post:

    dominoeffect (01-11-2008)

  • #5
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Ah, thank you very muchly.

    I knew it was staring me in the face!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •