/    Sign up×
Community /Pin to ProfileBookmark

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

to post a comment
CSS

3 Comments(s)

Copy linkTweet thisAlerts:
@rtretheweyMay 19.2013 — 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:
<i>
</i>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;body&gt;
&lt;div id="content"&gt;
.
.
.
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
Copy linkTweet thisAlerts:
@phpnewbie34authorMay 19.2013 — 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?
Copy linkTweet thisAlerts:
@rtretheweyMay 20.2013 — Nesting <div> tags is perfectly legal and there's no reason to avoid it.
×

Success!

Help @phpnewbie34 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.15,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...