Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Image background only in index?


apolyshow

Recommended Posts

Good evening.

Is there any way to ad an image background only to index page but in the all page and only in the content?

I have searched for one day the forum and nothing came as a solution...

Does anyone knows how?

 

i was trying through ths code in index.php

 

<div class="index">

<img src="images/background2.jpg" alt="">

</div>

 

and with that code in stylesheet.css

 

#index {

background-image : url('images/background2.jpg');

background-repeat : no-repeat;

background-position : 50% 50%;

background-attachment:fixed;

}

 

I am using osc 2.3.1

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

Ok i have manage the half of it.

 

in Index page at the very end after the ?> i have put the code

 

<div id="bg_image"> <img style="width: 100%; height: 100%;" src="images/background3.jpg"/> </div>

 

and in style sheet after the body the code

 

 

#bg_image {

width: 100%;

height: 100%;

left: 0px;

top: 0px;

position: absolute;

z-index: -1;

}

 

but the image is appearing in all the pages with the products and in all categories ( when you are choosing one) but it does' nt appears in all the other pages. So i am having a half success. How can i stop her to appears when a category is choosen?

One amateur made the Arc, 5.000 pro made the Titanic...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...