Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Footer size

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #46297
    Looking2Learn
    Participant

    Hi Everyone,

    Again very simple.

    I would like to make my footer the size of the body instead of the size of the main Div, if i change the width of the footer to width of the body its increased it in only one direction, if i then create a margin and put the opposite side as a negative, it then effect the contents within the footer, please see below a section from my style sheet:

    body {

    Background: #DEDEDE;
    font-family: arial;
    font-size: 12px;
    margin: -20px 0px 0px 0px;
    padding: 0px;
    height: 1000px;
    width: 900px;
    }

    #wrapper{
    width: 900px;
    height: 900px;
    margin: 0px 200px 0px 200px;
    background: white;
    }
    #footer{
    clear: both;
    height: 200px;
    width: 900px;
    text-align: center;
    margin: 0px 0px 0px 0px;
    font-family: arial, helvetica;
    font-weight: bold ;
    font-size: 11px;
    background-color: black;

    }

    Would really love some help!

    Thanks

    Joshua

    #142197
    Kitty Giraudel
    Participant

    Move your footer out of your wrapper.

    #142209
    jurotek
    Participant

    You should not be setting height on your elements. That should be determined by content within plus top and bottom padding.
    No need to repeat font-family, that cascades from body. No need for footer margin 0 0 0 0.

    #142362
    Looking2Learn
    Participant

    Thanks guy!

    Its very re-assuring to see some people are happy to help beginners just on the basis to be kind!

    Very grateful

    Kr

    Joshua

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.