www.webdeveloper.com
Results 1 to 4 of 4

Thread: Creating identical header and footer

  1. #1
    Join Date
    Apr 2013
    Posts
    23

    Creating identical header and footer

    Hey there friends.

    I am looking to add an identical repeat image to both the very top and bottom of the page.

    I added the image to the body {} tag and also the html {} tag.

    The problem is the body is set to 1000px width - so either the footer or header is limited to 1000 px width

    How do I make them both stretch the entire page??

    Thanks in advance

  2. #2
    Join Date
    Mar 2011
    Posts
    1,148
    Don't set the width on the <body>. Use a <div> to hold the page content, then you can style the <body> tag as you please. Something like:
    Code:
    <!DOCTYPE html>
    <html>
    <body>
    <div id="content">
    .
    .
    .
    </div>
    </body>
    </html>

  3. #3
    Join Date
    Apr 2013
    Posts
    23

    Re:

    That doesn't work as I am trying to create a header and a footer for my website.

    How do I put a DIV inside of a DIV ... or can use something else like DIV and put it inside a DIV?

  4. #4
    Join Date
    Mar 2011
    Posts
    1,148
    Nesting <div> tags is perfectly legal and there's no reason to avoid it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles