newbie here...

Discussion in 'HTML & Website Design' started by decemberblush, Apr 5, 2007.

  1. #1
    :eek: i'm a newbie when it comes to CSS so here goes the questions how do you attach the CSS codes to HTML and how to save the file containing CSS does it have an extention name as .css or simply .html? -thank you-
     
    decemberblush, Apr 5, 2007 IP
  2. pangea

    pangea Guest

    Messages:
    557
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you have to use the <link> attribue in the html file. the css file has the extension .css
     
    pangea, Apr 5, 2007 IP
  3. dmi

    dmi Well-Known Member

    Messages:
    2,705
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    140
    #3
    You put this in your <head>:

    <link rel="stylesheet" href="path/to/your/style.css" type="text/css" media="screen" />
     
    dmi, Apr 5, 2007 IP
  4. Rasczak

    Rasczak Peon

    Messages:
    131
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ... or you simply include a STYLEsheet right into your HEAD section (in html, not on the neck ;-)) :

    <head>
    meta tags, etc...
    ...
    <style type="text/css">
    #header {background: navy; color: silver; padding:20px}
    .caption {font-size: 20pt; font-weight: bold}
    </style>
    </head>

    and then in the HTML code:

    <body>
    ...your content...
    <div id="header">My first CSS-tuned page!</div>
    <h1 class="caption">This is my first CSS-tuned caption!</h1>
    ...
    </body>

    feel free to PM me if you have more questions...
     
    Rasczak, Apr 5, 2007 IP
  5. jgjg

    jgjg Peon

    Messages:
    595
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yes the css file should end in .css extension
     
    jgjg, Apr 5, 2007 IP