• I put a background image at the top of the body, and lowered the header. By doing so, I created a blue expanse between the page div and the bottom of the body. Where do I make the adjustment? Where do I look? Running 1.5 Kubrick.

    Thanks in advance.
    http://www.bughaw.com

Viewing 3 replies - 1 through 3 (of 3 total)
  • You have a 275px margin applied to both top and bottom of your body selector:

    body {
    margin: 275px auto;
    padding: 0;
    }

    Change it to:
    body {
    margin: 275px auto 0;
    padding: 0;
    }

    and you’ll get rid of that blue space at the bottom.

    Thread Starter milkphish

    (@milkphish)

    Many, many thanks NuclearMoose — that surely worked!

    —==— gayle
    http://www.bughaw.com

    You’re most welcome!

    For those who are new to CSS, let me offer a short explanation…

    When defining margins and padding, the values are for top, right, bottom, and left. CSS can, at times, be written in shorthand, so for example, margin: 10px auto; actually means 10px for the top, auto for right, 10px for the bottom, and auto for the left. Top/bottom and left/right values can be done in “shorthand”. When I suggested margin: 275px auto 0; it would render as top 275px, right auto, bottom 0px and left auto.

    I hope this helps a bit. Also, another quick CSS tip…if you have a value set as 0 (zero) you don’t need to add the units.

    Examples:
    0px
    0em
    0%
    can all be written as simply 0 (zero). Saves a bit of typing! 😉

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘[1.5] CSS problem’ is closed to new replies.