Please Help Wiith CSS- Can't get padding correct.

Discussion in 'HTML & Website Design' started by billurell, May 22, 2008.

  1. #1
    Hi ,
    I have spent 2 hours trying to get padding in the left side of my cutline blog. I am a big believer in puzzling things out, but there comes a time to ask for help. Can some one help get the text back off the border on the left side maybe 10px...I have been using trial and error on: http://addictionrecoverybasics.com

    #content_box {background:#fff; width: 970px; padding: 10; text-align: left; float: left; clear: both; }

    #content {background:#fff; width: 500px; padding: 0 20px 0 0; float: left; }

    ul#nav { background:#fff; list-style: none; height: 50px; width: 950px; padding: 0 10px; border-bottom: 0px solid #000; float: left; clear: both; }

    Am I Close?

    Thanks,
    Bill
     
    billurell, May 22, 2008 IP
  2. steelfrog

    steelfrog Peon

    Messages:
    537
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm assuming that #content is your content container. You're currently not applying padding to the left side with the definition you've posted:

    #content {background:#fff; width: 500px; padding: 0 20px 0 0; float: left; }
    HTML:
    When declaring padding and margin rules, the values goes from Top to Left in a clockwise fashion:
    1. Top
    2. Right
    3. Bottom
    4. Left

    So you need to change your padding value. Try this:
    #content {background:#fff; width: 500px; padding: 0 20px 0 10px; float: left; }
    HTML:
    If that fails for some reason (which is might, depending on your structure), you could try to drop a 10px margin away from the #content_box container by trying the following. Note that this may cause issues with your sidebar so you'll likely have to reduce your 500px width by 10px to accommodate the margin.

    #content {background:#fff; width: 500px; padding: 0 20px 0 0; float: left; margin-left: 10px; }
    HTML:
     
    steelfrog, May 23, 2008 IP
  3. scutari

    scutari Peon

    Messages:
    431
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Please declare which div did you use for the content(the text you want) to change?

    I think you better use margin for that check here:
    #content {

    background:#fff;
    width: 500px;
    margin: 0 20px 0 10px;
    float: left;
    }
    And use dreamweaver as it helps when showing padding and margin(at the preview section)
     
    scutari, May 23, 2008 IP