Results 1 to 8 of 8

Thread: Text Colour Change

  1. #1
    Join Date
    Nov 2008
    Posts
    13
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question Text Colour Change

    <h1><strong><span class="blue">Storage Solutions </span></strong></h1>

    Can anyone tell me what i am doing wrong, when i preview this it stays black and the text doesnt turn blue

    Thanks

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Make sure your css code looks like this:
    Code:
    .blue {
    color: blue;
    }
    Good luck!

  3. #3
    Join Date
    Aug 2008
    Location
    Smiths, AL
    Posts
    164
    Thanks
    30
    Thanked 5 Times in 5 Posts

    Default

    You could also write it like this
    <h1><strong><font color="#0000FF">Storage Solutions </font></strong></h1>
    but it would be better to do set it up in the css.

    Name it according to its position in on the page, ie. header, sides, footer, ect.
    ___________________________________

    Still working on it!

  4. #4
    Join Date
    Feb 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If you wanted to do inline styles do

    Code:
    <span style='color:blue'>Contents</span>

  5. #5
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    you probably only need half of those tags as well.
    .blue {
    color:blue;
    font-weight:bold;
    }
    <h1 class="blue">Storage Solutions</h1>

    or

    <h1 style="color:blue; font-weight:bold;>Storage Solutions</h1>

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Note: 'blue' is not a good choice of class name. Identifiers should be semantic, not visual.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    Join Date
    Mar 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi djohno,

    Try this code

    <h1><strong><font color="#0000FF">Storage Solutions </font></strong></h1>
    Have a nice day !

  8. #8
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Don't do that, please. The <font> element has been deprecated since HTML3.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •