Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Image background only in index?


3 replies to this topic

#1 apolyshow

  • Community Member
  • 242 posts
  • Real Name:Andreas
  • Gender:Male

Posted 02 February 2012, 17:41

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

Edited by apolyshow, 02 February 2012, 17:44.

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

#2 apolyshow

  • Community Member
  • 242 posts
  • Real Name:Andreas
  • Gender:Male

Posted 03 February 2012, 06:19

Nobody knows?
Please i must fix my wifes site cause if not i will not eat today....
One amateur made the Arc, 5.000 pro made the Titanic...

#3 apolyshow

  • Community Member
  • 242 posts
  • Real Name:Andreas
  • Gender:Male

Posted 03 February 2012, 21:20

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

#4 usernamenone

  • Community Member
  • 2,175 posts
  • Real Name:Lola
  • Gender:Female
  • Location:United States

Posted 04 February 2012, 04:02

index.php

just after

<?php
if (tep_not_null(TEXT_MAIN)) {
?>

or in your includes languages english index.php
define('TEXT_MAIN', 'inside here.................');

Edited by usernamenone, 04 February 2012, 04:07.