CSS newbie questions

Discussion in 'CSS' started by dianes, Mar 8, 2008.

  1. #1
    Hey,
    I'm trying to learn the basics of CSS. Does everything go in a div?

    Also, why doesn't my div called "line" show up?

    <html>

    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <link rel="stylesheet" type="text/css" href="css.css">
    </head>
    <body>

    &nbsp;<div id="navigation" style="position: absolute; left: 88px; top: 402px">
    <p style="text-align: right"><b><font face="Century Gothic" size="4">
    <a href="home.html" style="text-decoration: none"><font color="#003300">Home</font></a></font></b><br>
    <font face="Century Gothic" style="font-size: 14pt; font-weight: 700" color="#003300">
    Pets<br>
    About us<br>
    Services<br>
    News</font></div>

    <div id="content">
    <div style="position: absolute; width: 100px; height: 50px; z-index: 21; left: 252px; top: 403px" id="welcome">
    <img border="0" src="images/welcome-semi-trans.gif" width="273" height="42"></div>
    <h1 style="text-align: left"> &nbsp;</h1>
    <p style="text-align: left"> <font color="#003300" size="3">We hope you like it</font></p>
    <p style="text-align: left"> <font color="#003300" size="3">etc...</font></p>

    <div style="position: absolute; width: 25px; height: 100px; z-index: 23; left: 210px; top: 401px" id="line">
    <img border="0" src="images/line.jpg" width="3" height="635"></div>
    <div style="position: absolute; width: 100px; height: 100px; z-index: 22; left: 56px; top: 0px" id="header">

    <img border="0" src="images/header.jpg" width="800" height="361" align="top"></div>
    </div>

    </body>

    </html>
     
    dianes, Mar 8, 2008 IP
  2. dianes

    dianes Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Also, should i be using absolute positioning?
     
    dianes, Mar 8, 2008 IP
  3. X.Homer.X

    X.Homer.X Peon

    Messages:
    290
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    all your styling should be done using css instead of putting it right into your html. i would do it for you right now but its late, and im afraid id probably mess it up somehow, seeing as im a newbie to the whole css universe.
     
    X.Homer.X, Mar 8, 2008 IP
  4. blurredfringe

    blurredfringe Member

    Messages:
    77
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    48
    #4
    place the css styles in the linked stylesheet that you declared i.e. "css.css". or you can use inline styles within the head if you want it to reside in the same html page so you can see it right away.


    <style type="text/css">

    #div {
    property: value;
    }

    </style>
     
    blurredfringe, Mar 10, 2008 IP