Css, lost already

Discussion in 'Web Design & Coding' started by 03bigMark03, Apr 2, 2003.

  1. 03bigMark03

    03bigMark03 Guest

    Hi there, I'm redesigning http://www.potton-delph.co.uk , as you can see from the thread above.

    I just learnt that I could use CSS and have read a tutorial and have a basic idea of how everything fit's together but i'm totally lost when it comes to practice. If you guys could provide a working example that would be great.

    Cheers.

    Mark.
     
  2. SPeedY_B

    SPeedY_B I may actually be insane.

    Messages:
    15,800
    Location:
    Midlands, England
    If you just want an example here's a sheet I've just finished (along with XHTML 1.1 compliancy) for my webcam portal (link in sig)
    Code:
    body {
      font-family: Verdana, arial, sans-serif;
      color: #000000;
      font-size: 10px;
      background-color: #FFFFFF;
    }
    td {
      font-family: Verdana, arial, sans-serif;
      color: #000000;
      font-size: 10px;
      background-color: #FFFFFF;
    }
    a:link { 
      color: #000000; 
      background: transparent
    }
    a:visited { 
      color: #282828;
      background: transparent
    }
    a:active { 
      color: #FF0000;
      background: transparent
    }
    .titles {
      background-color: #000000;
      font-family: Verdana, arial, sans-serif;
      color: #FFFFFF;
      font-size: 10px;
      background: url("img/BG.png");
      background-repeat: repeat-x;
      border-bottom: 0px #000000 solid;
    }
    .btable {
      border: 1px #000000 solid;
      width: 140px;
    }
    .maintable {
      border: 1px #000000 solid;
      width: 400px;
    }
    .maindiv {
      text-align: center;
    }
     
  3. Kevin Ar18

    Kevin Ar18 OSNN Senior Addict

    Messages:
    300
    And of course the following code (without the period at the beginning) would apply to the <body> tag that's part of regular HTML.
    PHP:
    body {
      
    font-familyVerdanaarialsans-serif;
      
    color#000000;
      
    font-size10px;
      
    background-color#FFFFFF;
    }
    The ones with the period work differently. For exampe:
    PHP:
    .maindiv {
      
    text-aligncenter;
    }
    You could add that style to almost any tag there is. For example:
    <div class="maindiv">div contents</div>
    <p class="maindiv">test</p>
    <span class="maindiv">test</span>
     
  4. 03bigMark03

    03bigMark03 Guest

    Thanks

    Cheers for all the help.

    SpeedY_b can I speak to you soon. Ill send an email hopefully.