/    Sign up×
Community /Pin to ProfileBookmark

Background Image on html/body

Hello. I am building this joomla template and I need to have a background image at the top and one at the bottom that go all the way to the edges of the screen.

so i put one image on the html tag and one on the body tag. the images are wider then the screen so they reach the edge regardless of the person’s screen size:

html {margin:0; padding:0; background: #f4f4f4 url(../images/image.png) center top no-repeat;}
body {margin:0; padding:0; background: url(../images/image2.png) center bottom no-repeat;}

everything looks fine on firefox and IE8,7. but when I look at the page on my iPhone built-in safari browser the bottom image does extend all the way to the right edge. It stops about 150px away from the edge.

And I’ve noticed this problem before with other websites. Has anyone else ran into this and is there a way to fix it?

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@PBSWebDesignFeb 16.2011 — Include the ' ' inside of the parentheses around the path to the images and see if that solves the problem.
×

Success!

Help @dad7more 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.29,
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,
)...