62 users online (1 members and 61 guests)  

Thread: CSS text color


  Results 1 to 11 of 11

Related

  1. how do I change text color?    Forum: CSS Forum
    Replies: 1
  2. Css text color    Forum: CSS Forum
    Replies: 2
  3. Changing Color of Text Box Scroll Bar    Forum: HTML Forum
    Replies: 4
  4. Changing Text Box Scroll Bar Color    Forum: HTML Forum
    Replies: 1
  5. Text color on buttons    Forum: HTML Forum
    Replies: 5
  1. #1
    htmldummie's Avatar
    New User

    Status
    Offline
    Join Date
    Jul 2004
    Posts
    6

    CSS text color

    Hi,
    This has probably been posted a million times, but seeing as I don't come here a lot I haven't seen it yet.
    I use this code to set my background-color and my scrollbar color, but whatever I try, I can't seem to change my text-color. Can someone tell me how to add that?

    body {background-color: #000000;
    scrollbar-DarkShadow-Color: #000000;
    scrollbar-Track-Color: #000000;
    scrollbar-Face-Color: #000000;
    scrollbar-Shadow-Color: #000000;
    scrollbar-3dLight-Color: #000000;
    scrollbar-Highlight-Color: #000000;
    scrollbar-Arrow-Color: #FFFFFF;
    }

    Thanks!

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hiya,

    just add

    Code:
    color: white;
    Or whatever colour you want.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    Hi there htmldummie,

    if you wish to set the text color for the whole page, then use this code....
    Code:
    
    <style type="text/css">
    <!--
    body {
         color:#ff0000;
     }
    //-->
    </style>
    
    ....if you wish to set the text color for a specific element, then use this code....
    Code:
    
    <style type="text/css">
    <!--
    .foo {
         color:#ff0000;
     }
    //-->
    </style>
    ...then add this to the element...
    Code:
    
    <div class="foo">this text will be red</div>


    To further your 'css' skills check out these sites...
    • http://css.somepeople.net
    • http://www.w3schools.com/css/default.asp


    coothead

  4. #4
    coothead's Avatar
    bald headed old fart

    Status
    Offline
    Join Date
    Aug 2003
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    732
    Sorry Dean,

    you weren't there when I started on this one

    coothead

  5. #5
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    I guessed by the timestamps
    You answer was fuller anyway, no harm done.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  6. #6
    TalonStriker's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    8

    Arrow

    does font-size also work in body{}?

    I always try into include font-size in body but it never works...

    ie:
    Code:
    BODY {
    	SCROLLBAR-FACE-COLOR: #163061; SCROLLBAR-HIGHLIGHT-COLOR: #163061; SCROLLBAR-SHADOW-COLOR: #8da3ba; SCROLLBAR-3DLIGHT-COLOR: #8da3ba; SCROLLBAR-ARROW-COLOR: #8da3ba; SCROLLBAR-TRACK-COLOR: #163061; SCROLLBAR-DARKSHADOW-COLOR: #163061; BACKGROUND-COLOR: #163061;  background-image: url('http://www.games.ni5.com/images/layoutbg.jpg'); BG-PROPERTIES: fixed; color: white;
    font-family: tahoma, verdana; font-size:10px;
    
    }
    despite the font-size, the webpage uses a font-size of 14...
    Last edited by TalonStriker; 03-11-2005 at 10:44 AM.

  7. #7
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    It should be working, make sure no other rule is applying to the text. If you can't spot anything just post a link to your page and we can take a look.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  8. #8
    TalonStriker's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    8
    there is no other rule but the text is inside <div>

  9. #9
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Could we have a link?
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  10. #10
    TalonStriker's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    8
    i haven't uploaded it yet... i'll try to by 4:00PM EST

  11. #11
    TalonStriker's Avatar
    New User

    Status
    Offline
    Join Date
    Oct 2003
    Posts
    8

    Red face

    Edit: NVM, i hadn't uploaded the edited version of my .css file