Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Background image for 'Main' (Content) area 'Default.PHP'


weird2u2

Recommended Posts

Posted

I have tried every way I can think of so...far.

 

I can set the background colour for the main product area in the default.php file using

 

TD.main {'background:#000080;}

 

...this works fine but if I try using a reference to a background image, no luck.

ie; TD.main{background=url(/images/myimage.gif);}

 

(This code below, I think is for the main content area !!?)..

 

......So i try to insert background image here:-

 

 

<td class="main"><?php echo tep_customer_greeting(); ?></td>

</tr>

<tr>

<td valign="middle" background="/catalog/images/cuphd.jpg" border="0" width="100%" height="100%"><br><?php echo TEXT_MAIN; ?></td>

</tr> ect....)

 

 

 

 

...it does'nt work.

 

Can I do this in CSS ??

 

Have I missed something important about the main-content area ?

Posted

I think that

TD.main{background=url(/images/myimage.gif);}
is wrong. What I ended up doing was to use background-image, i.e.
TD.main{background-image=url("/images/myimage.gif");}

 

Good luck,

Matt

I love deadlines. I like the whooshing sound they make as they fly by. ---Douglas Adams

Posted

Yes many thks....got it now.

 

:? Dunno wots up with me...everytime I post a problem that I have spent hrs trying to figue.....5 mins later I work it out.... :shock:

 

 

here's how I got it to work...in CSS

 

#backimg {background-image: url(images/cuphd.gif);

background-repeat: no-repeat;

background-position: center;

height:400px;}

 

 

I gave the TD<class="main" ....an <td id="backimg" class="main" >

 

So I call the single cell with an id="backimg"....just using the class gives two images...as cell above has class="main" as well

 

 

Thks again,

 

no doubt I will be posting again, :wink:

Archived

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

×
×
  • Create New...