Home » questions » CSS Positioning for Footer?

CSS Positioning for Footer?

2006-08-11 20:39:02, Category: Programming & Design
Ok, I'm moderately experienced with CSS, but so far I've mostly used it to control the formatting of text and elements across my site, and I just started using it for positioning. I need CSS positioning/layout to place a footer at the bottom of http://montanalightphotography.com/landscapes.php So far my main content area has these CSS properties: width: 675px; margin-left: 170px; margin-bottom: 75px; position: absolute; top: 172px; background-color: lightyellow; border: 1px dashed gray; padding: 0px 0px 0x 8px; What CSS properties/values do I need to have a footer DIV appear, say 30 pixels below the above DIV?

Answers

  1. anonymous

    On 2006-08-11 21:18:51


    It beats me. I wish I could help more, but I'm only beginning to learn CSS myself. This link looks promising however: http://alistapart.com/articles/footers Good luck!
  2. achtungbaby

    On 2006-08-13 17:13:36


    Absolutely positioned items need to be placed within relatively positioned containers, or containers that will appear where the browser assumes they'll appear. 1) Validate your code. You appear to have some basic HTML errors (http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fmontanalightphotography.com%2Flandscapes.php) 2) Use float positioning instead. Absolute positioning will require you to set a relatively positioned container around you absolutely positioned elements. Using floats, you can change your current HTML to this instead: - line 25:
      to
        - line 50:
        to
        - line 91: