SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    Resident Boozehound simontheak's Avatar
    Join Date
    Jun 2003
    Location
    _root.europe.uk.london
    Posts
    965
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Styling header links

    Sometimes I wonder if I'll ever get the hang of CSS.

    Can someone help me out with this bit of code?

    HTML Code:
    h2 a {
    	color: #42afb6;
    	text-decoration:none;
    	border-style: none;
    	font-size: 12px;
    	font-weight: bolder;
    	text-transform: none;
            font-variant: small-caps;
    }
    I'm trying to style <h2> tags that are also links.

    Thanks alot

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2006
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Please be more specific as to what isn't working. The CSS you listed should style links that are contained within an H2 tag:

    <h2><a href="#">your text here </a></h2>

  3. #3
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you're trying to make the links inside the headings take up all the space inside their container set their display to block and then declare a width.

  4. #4
    Resident Boozehound simontheak's Avatar
    Join Date
    Jun 2003
    Location
    _root.europe.uk.london
    Posts
    965
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply Dan and apologies for not being specific enough.

    You can see the problem at http://www.pkrpoker3d.com. I'm trying to style the first white heading on the page: the font-variant seems to work, but the colour should be the same blue as the main heading and it should be slightly larger.

    I can't quite understand why only part of the CSS is working.

    Thanks again for your help.

  5. #5
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmm... seems to be working here. Did you fix it in the meantime?

  6. #6
    Resident Boozehound simontheak's Avatar
    Join Date
    Jun 2003
    Location
    _root.europe.uk.london
    Posts
    965
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope - still seems to be broken - are you seeing green headers then? It's on the bonus codes page.

  7. #7
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm seeing a bluish-green header, yes.

  8. #8
    Resident Boozehound simontheak's Avatar
    Join Date
    Jun 2003
    Location
    _root.europe.uk.london
    Posts
    965
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Dan,

    It's actually the link that's underneath that. The (what is currently) a small white link in small caps.

    Thanks again for your help - it really is appreciated!

  9. #9
    SitePoint Wizard bronze trophy Centauri's Avatar
    Join Date
    May 2007
    Location
    Newcastle, Australia
    Posts
    3,718
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have a style entry for .entrybody a which is more specific than h6 a, so it takes precedence. You need to make the green style more specific by changing h6 a to .entrybody h6 a

  10. #10
    In memoriam gold trophysilver trophybronze trophy Dan Schulz's Avatar
    Join Date
    May 2006
    Location
    Aurora, Illinois
    Posts
    15,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah. I was looking at the one above that, sorry. (And yes, Centauri's right.)


Bookmarks

Posting Permissions

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