Jump to content

How do I position my div background image at the right edge of the screen?


JustRob

Recommended Posts

Hello, I'm trying to build a stylesheet, and am currently working on the background.Right now my background consists of three elements: A background color and image that doesn't repeat, specified in the body CSS. Then there's another background image specified in a separate div, which is placed inside the body tags in my HTML. This second background image repeats vertically. However, this second background image leaves some empty space between it and the right edge of the screen. I want to remove that space so it lines up with the top image. Here's a picture of what's wrong: BAHH8LH.png And here's my CSS so far:

@charset "UTF-8";/* CSS Document */body{background-color: #132309;background-image: url(../img/top_right.png);background-position: 100% 0%;background-repeat: no-repeat;}#backgroundright{background-image: url(../img/rightbg.png);background-position: right;background-repeat: repeat-y;margin-top: 199px;height: 500px;}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...