Code problems

  • How can I insert the .css code called anchor pseudo-classes hover into my website.
    code i.e. #link a:hover{ background:#656565, color:#ccc,)

    And please explain it like you would to a 10 year old child.
    Thanks 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • Brandon Kraft


    Happiness Engineer

    I’ll do the best I can 🙂

    The goal: To edit your theme’s style.css file to include that directive.

    I would use a FTP client ( http://codex.wordpress.org/FTP_Clients ) to login to your website and download a copy of the style.css file.

    style.css will be found in the /wp-content/themes/YOURTHEMENAME/ folder on your server where WordPress is installed.

    Opening that file, you’ll see the CSS code for your theme.

    You can copy and paste the code in there. FYI: The correct code would be #link a:hover{ background: #656565; color:#ccc;}

    Hope that helps.

    The answer is here


    it teaches how to edit the style.css file, just edit that file and insert you code at the end of the file.

    Thanks allot 4 the replies!
    One more question, Where do I exactly paste the code cause the style.css is filled with code.
    Sry for being so dumb 🙁

    Brandon Kraft


    Happiness Engineer

    We all start somewhere. No need to feel dumb.

    The end of the file on a line by itself is fine. CSS is a pretty forgiving language!

    Is it good to post it right in the middle of this

    #respond dd {
    display: inline;
    #link a:hover{ background: #656565; color:#ccc;}
    /* =END
    ————————————————————– */


    Brandon Kraft


    Happiness Engineer

    That should be fine.

    Brandon Kraft


    Happiness Engineer

    (FYI – heading offline for the night, so I won’t be able to turn around any quick answers for a few hours!)


    I have been
    told that this code can make post edits like

    But upon inserting the code inside the file I haven’t noticed any change in my posts, so that left me confused and without any idea what to do next.
    If you can help me solve this problem I would be most thankful!

    Brandon Kraft


    Happiness Engineer

    The CSS code is dependant on your HTML “calling” it.

    With the code you submitted to add your style.css, it is assuming there is a id of “link” somewhere (e.g. <p id="class">text</p>)

    What’s your site address?

    More likely, you’ll want to use a class instead, but like I said, it is dependent on your HTML.

    Think of it like this. HTML is the building blocks, CSS says how to put it together and make it look. If your CSS says doors are green, but your HTML doesn’t include doors, then there’s nothing to become green.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Code problems’ is closed to new replies.