SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 29 of 29

Thread: Changing header and sidebar width on Wordpress?

  1. #26
    Grüße aus'm Pott
    SitePoint Award Recipient Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    2,454
    Mentioned
    39 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Mr.81 View Post
    I'm back again -_- ha, it seems there's a "strikethrough" on the element stopping the link colour coming through...if I inspect a linked element, the "color" has a strikethrough through it...if I tick the box next to it, it shows the colors. What's restricting the colors being shown?
    Hi there,

    This happens when a more specific CSS style overrides a more generic one.
    For example If you have this:

    HTML Code:
    <!DOCTYPE HTML>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Specificity example</title>
        <style>
          a{color: green;}
          a.warning{color:yellow}
        </style>
      </head>
      
      <body>
        <a href ="">A Link</a>
        <a class="warning" href="">A second Link</a>
      </body>
    </html>
    This will output two <a> tags on a page.
    The first will be green, but the second will be yellow (the reason being that we defined a warning class and applied it to our second link).
    If you inspect the second link with a property inspector, then you will see:

    a.warning {
    color: yellow;
    }

    a {
    color: green;
    }

    This is because for link two, the browser picks up on the first style.
    Then the first style is immediately overridden by the second style.

    Does that help?
    How well do you know your JavaScript from your jQuery?
    Check out SitePoint's latest JavaScript challenge


    My blog

  2. #27
    The CSS Clinic is open silver trophybronze trophy
    SitePoint Award Recipient Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    37,776
    Mentioned
    99 Post(s)
    Tagged
    3 Thread(s)
    Hi,

    When I look at the page the color:#555 is being implemented from line 3 of black.css.

    Note that you also have some styles in the head of the page in style tags so you need to watch out for those also but they don;t seem to be interfering with the main link colour that I can see.

  3. #28
    SitePoint Enthusiast
    Join Date
    Nov 2008
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for your reply.

    Ah, so I need to basically get rid of the overriding style, which is the black?

  4. #29
    The CSS Clinic is open silver trophybronze trophy
    SitePoint Award Recipient Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    37,776
    Mentioned
    99 Post(s)
    Tagged
    3 Thread(s)
    Either get rid of it if you have access to the files or over-ride it with a more specific style somewhere else.

    e.g.
    Code:
    body a{color:orange}/* set the color here */
    Last edited by Paul O'B; Mar 5, 2013 at 06:34.

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
  •