Coloured Space?

Discussion in 'CSS' started by hitmanuk2k, Mar 7, 2007.

  1. #1
    Hello,

    I am quite new to CSS (currently reading my first book on the subject) and trying to put together a new design I have been working.

    I have encountered something not covered in my book, spacing. In table layouts I would have used spacer images to create the effect I need, but I can't seem to figure out how to do it in CSS.

    I want to have a coloured line beneath my header. I have managed to get the white 2px space using a bottom margin, but can't create the blue line (see image attached).
     

    Attached Files:

    hitmanuk2k, Mar 7, 2007 IP
  2. Clive

    Clive Web Developer

    Messages:
    4,507
    Likes Received:
    297
    Best Answers:
    0
    Trophy Points:
    250
    #2
    May I see the code snippet so I can give you straight instructions rather than guess what might work.
    Should be an easy thing.
     
    Clive, Mar 7, 2007 IP
  3. Dan_A

    Dan_A Peon

    Messages:
    65
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
  4. bacanze

    bacanze Peon

    Messages:
    2,419
    Likes Received:
    127
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Applying a margin to whatever you require spacing between should work like

    .space {
    margin-bottom: 5px; }

    and the apply that as a class to your object :)
     
    bacanze, Mar 7, 2007 IP