WordPress.org

Ready to get started?Download WordPress

Forums

Code problems (11 posts)

  1. Cyberxuser
    Member
    Posted 1 year ago #

    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 :)

  2. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    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.

  3. David Choi
    Member
    Posted 1 year ago #

    The answer is here

    http://wordpress.org/support/topic/complete-newbie-question-how-to-edit-stylecss-to-change-a-font?replies=6

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

  4. Cyberxuser
    Member
    Posted 1 year ago #

    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 :(

  5. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    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!

  6. Cyberxuser
    Member
    Posted 1 year ago #

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

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

    ?

  7. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    That should be fine.

  8. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

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

  9. Cyberxuser
    Member
    Posted 1 year ago #

    Thanks!

  10. Cyberxuser
    Member
    Posted 1 year ago #

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

    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!

  11. Brandon Kraft
    Happiness Engineer
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags