Newbie help --> Padding & Margins in IE

Discussion in 'CSS' started by Supergrover1981, Jul 15, 2006.

  1. #1
    Gidday Guys,

    I'm currently trying to use padding-left and padding-top to put a bit of space between the text and a background: url(....) image I'm using on my site. In FireFox the alignment works just fine, but IE seems to ignore the padding tag entirely.

    I'm quite new to the whole CSS thing and am unsure as to what I'm doing wrong. If anyone could offer advice on how to align the content without changing the alignment of the background image in the same CSS DIV, I'd be most appreciative.

    Cheers gang,
    - SuperGrover
     
    Supergrover1981, Jul 15, 2006 IP
  2. JosS

    JosS Guest

    Messages:
    369
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try this instead

    body {
    margin-left:20px;
    margin-right:20px;
    margin-top:0;
    margin-bottom:0;
    }

    or use that CSS for the specific container the text is in.

    Or an even easier solution would be to wrap all your text in <p> tags.

    so <p>text</p>

    then in your CSS file have

    p {
    padding: 0 15px 0 15px;
    }
     
    JosS, Jul 16, 2006 IP