/    Sign up×
Community /Pin to ProfileBookmark

How to make 2 bgs repeat?

This is my layout [url]http://www.deliciousmanga.com/demo/[/url]
I have 2 backgrounds one for the left side and one for the right side. As you can see I’m trying to make 2 backgrounds repeat-x so if the user’s screen resolution is wider than 1024px it should stretch along. I managed to do it but my #bg div is making my browser have a horizontal bar which I don’t want. How can I fix this?

[CODE]* {
margin: 0px;
padding: 0px;
}

body {
background-image: url(images/leftbg.jpg);
background-repeat: repeat-x;
background-color: #FBD7C1;
}

#bg {
background-image: url(images/rightbg.jpg);
background-repeat: repeat-x;
float: right;
height: 205px;
position: relative;
left: 1000px;
width: 1000px;
}

#wrapper {
margin: auto;
width: 975px;
}

#header {
background-image: url(images/header.jpg);
height: 205px;
width: 975px;
}

#sidebar {
width: 220px;
background-color: #CA577E;
float: left;
position: relative;
top: -20px;
left: 25px;
padding: 10px;
}

#content {
width: 600px;
background-color: #C93;
float: right;
}
[/CODE]

to post a comment
CSS

1 Comments(s)

Copy linkTweet thisAlerts:
@FangSep 19.2010 — The html element is also allowed to have a background image.
×

Success!

Help @Ruriko 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.24,
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,
)...