Jump to content

Background Image on left and rightside of page.


lynxus

Recommended Posts

Hi,

How can i have an image on the left and an image on the right side of my page.

 

IE:

My page is centered, I can have a fading gradient on the left however how do i get one on the right also?

 

body{

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

background:#ffffff;

background:url(images/rightside.png);

background-repeat:repeat-y;

}

 

Thanks

Graham

 

Hi,

How can i have an image on the left and an image on the right side of my page.

 

IE:

My page is centered, I can have a fading gradient on the left however how do i get one on the right also?

 

body{

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

background:#ffffff;

background:url(images/rightside.png);

background-repeat:repeat-y;

}

 

Thanks

Graham

 

 

Why use two background images? Combine the two images into one since you are repeat it up and down. If you want two DIFFERENT Background images that couldn't be combined, you would need to use two divs.

To elaborate on what the film god said, if your div has a fixed width, use one image. If you need variable widths, you can do it like this:

 

<div id="left_side">
  <div id="right_side">
    // content
  </div>
</div>

 

You can then set the background images to div#left_side and div#right_side.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.