• imaginelovinglife

    (@imaginelovinglife)


    This is most likely very simple. I cannot seem to figure this out.
    I want to change the font color and link color of a section to red.

    I tried.

    <div id=”redtext”>The end of this article. red link.</div>

    I put in my style.css
    #redtext { color: #FF0000; }

    This is not working for me. Can anyone help me. Thanks.

    Edit: I would like to do this in css. If I do it in <span style=”color: red;”>, it works but would like this done in css for better and cleaner code.

Viewing 1 replies (of 1 total)
  • lilleulven

    (@lilleulven)

    From a short test I could see your link-text is not going to be red with your code. Is that the problem you are trying to solve?

    If so change your css to:
    .redtext, a.redtext { color: #FF0000; }

    And change your text to:
    <div class="redtext">The end of this article. <a class="redtext" href="#">red link</a></div>

    That should do the trick.

Viewing 1 replies (of 1 total)
  • The topic ‘Changing Font Colors Using DIV’ is closed to new replies.