Body Background Positioning

liunx

Guest
Hi -
I've got a background 750px wide that I'd like to apply to the body's CSS tag. How do I set this style (background-image) to always display aligned with the top left edge for monitor resolutions larger than 800x600 without affecting the page's content display?
Thanks,
KDLAI'm a little unclear as to exactly what you want to do. Could you elaborate? (Preferably with a link to the page you're working on).Thanks, Bon Rouge for your interest in helping me.

I have an image I'd like to use as a background, situated on the right side of the screen, with the content on the left. The image isn't one to be tiled, but only appear once on the page. I've formatted the image's dimensions to automatically fit an 800x600 screen, so that it isn't cut off by that resolution.

I need to add some coding to the body tag that will enable this image to move towards the right when the viewer's monitor setting exceeds 800x600, so that the image is always right-aligned with the edge.

I've experimented with absolute positioning, but am not proficient enough with it to accomplish what I need to do.

Below is the coding I currently have.

body {width: 100%; background-color: white; background-image: url(background.jpg); background-repeat: no-repeat; height: 966px; minimum-height: 1000px;}

This is the coding (so far...) for the content divs:
width: 400px; margin: 0; padding: 0 15px 0 0;

This is the link to the background:
<!-- m --><a class="postlink" href="http://kdla.ky.gov/_test/background.jpg">http://kdla.ky.gov/_test/background.jpg</a><!-- m -->

Thanks,
KDLAIf you want it to be on the right, you can do this :
body {
background: #fff url(background.jpg) right top no-repeat;
}Thanks Bon Rouge. :) Worked like a charm!

Isn't that weird... I had tried that before, but it didn't work. Possibly when you stripped out some of that other code from the body tag helped rectify the problem.

Have a good one -
KDLAHi -
Yeah, the shorcut version of background is cool...
background:#color or transparent url("ifusinganimage.ext") fixed or scroll % %;

;-)yeh heaps cool
 
Back
Top