How do I make the text red?

Discussion in 'CSS' started by JakeThePeg, Nov 16, 2009.

  1. #1
    Hi there!

    Simple question - I need to amend the CSS slightly on the home page of www.onemillhitwonder.com, so that the text "Shackn.com" is red in colour, and slightly larger. How do I do this?

    (Also, is anyone else seeing the error when you hover over the title at the top left? I can't work out what is going on there....)
     
    JakeThePeg, Nov 16, 2009 IP
  2. vinpkl

    vinpkl Active Member

    Messages:
    899
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #2
    hi

    add this to your css file
    a.redlink{
    font-size:22px;
    text-decoration:none;
    color:#FF0000;
    font-family: 'Lucida Sans', 'Lucida Grande', 'Lucida Sans Unicode', sans-serif;
    }
    a.redlink:hover{
    font-size:22px;
    text-decoration:none;
    color:#FF0000;
    font-family: 'Lucida Sans', 'Lucida Grande', 'Lucida Sans Unicode', sans-serif;
    }

    and amend this in your html code

    <a href="http://www.shackn.com" class="redlink">shackn.com</a>

    vineet
     
    vinpkl, Nov 16, 2009 IP
  3. Casually

    Casually Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Alternatively:

    h2 a {
    font-size:22px;
    color:red;
    }

    h2 a:hover{
    font-size:22px;
    color:red;
    }
     
    Casually, Nov 17, 2009 IP
  4. JakeThePeg

    JakeThePeg Active Member

    Messages:
    230
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #4
    Perfect, worked like a dream. Thanks very much for that. I couldn't opt for a generic h2 style, because it would have also affected the other headings on the site.

    Did you get a chance to look at the concept of the site? If so, what do you think?
     
    JakeThePeg, Nov 17, 2009 IP
  5. vinpkl

    vinpkl Active Member

    Messages:
    899
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    58
    #5
    hi

    happy to know that my solution worked for you.

    vineet
     
    vinpkl, Nov 17, 2009 IP
  6. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #6
    But you could have easily given that h2 some special id or class, like vinpkl's "redlink" class.

    h2.redlink a {
    color: #f00;
    }
    etc

    Not that it matters, since right after that there's this evil-lookin' <font color=red> in there. Lawlz : )
     
    Stomme poes, Nov 17, 2009 IP
  7. JakeThePeg

    JakeThePeg Active Member

    Messages:
    230
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #7
    Hi again....

    I went to implement this CSS code into my new template...I assumed that I could just copy and paste the code mentioned above into my CSS file and that all would be fine. But apparently not.

    Does anyone have any suggestions can I can update my NEW template for One Million Hit Wonder, so that the 'amirite.com' link (beside the Current Advertiser heading) is set to 22 pixels and in red?
     
    JakeThePeg, Nov 23, 2009 IP
  8. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Currently, in my browser, it appears to be 30px (font-size) and red.

    Did you fix it then?
     
    Stomme poes, Nov 24, 2009 IP
  9. JakeThePeg

    JakeThePeg Active Member

    Messages:
    230
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #9
    Yes, it must have been cached before, because it mysteriously fixed itself :)
     
    JakeThePeg, Nov 24, 2009 IP