text color change?

Discussion in 'CSS' started by tptnyc, Jan 20, 2008.

  1. #1
    From Newbie, need to change text color and font, how to change that and which portion of css file I can find?
     
    tptnyc, Jan 20, 2008 IP
  2. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Well to change the colour of all text on a page you would usually use the following,

    CSS:
    
    body
    {
    color: #colour;
    }
    
    Code (markup):
    and to change all of the text's font on a page you would use,

    CSS:
    
    body
    {
    font-family: Arial;
    }
    
    Code (markup):
    If you want to just change particular parts of the website you will need to provide some code for us to look at, or even post a link to the site.

    Nick
     
    nicangeli, Jan 20, 2008 IP
  3. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks Nick,And if you want to change both color and font on one particular page, how will you write this code together?
    And for the entire website, how that will be written?
     
    tptnyc, Jan 20, 2008 IP
  4. nicangeli

    nicangeli Peon

    Messages:
    828
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi,

    If you want to embed the css on one page so that it only changes the text colour and family you can try the following, add the code before the </head> tag;

    HTML:

    
    <style type="text/css">
    <!--
    body {
    color: #color;
    font-family: Font;
    }
    -->
    </style>
    
    Code (markup):
    and usually if you want to change things such as font and colour in the entire website you would have to use an external stylesheet, add the following code before </head>

    HTML:
    
    <link rel="stylesheet" type="text/css" media="screen" href="screen.css">
    
    Code (markup):
    and the create a new file, and call that screen.css make sure you save it in the same direcotry as the index page, (if you know what I mean?)

    CSS:
    
    body
    {
    color: #colour;
    font-family: font;
    }
    
    Code (markup):
    Nick
     
    nicangeli, Jan 20, 2008 IP