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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.