Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Adding Background image thru stylesheet


juniorprg

Recommended Posts

Posted

Hello all

 

I am using the Fixed Width Site Template contribution, now i need to change the insert a background image instead of putting color. How do I do that

 

This is how the stylesheet BODY looks

 

BODY {

text-align: center;

background: #ffffff;

background-image:url(images/bg.gif);

color: #000000;

margin: 0px;

}

 

.body {

width: 758px;

border: solid; border-width: 1px;

background: #000000;

color: #000000;

margin: auto;

margin-top: 10px;

text-align: left;

}

 

 

Even after putting the background-image nothing is showing up...just shows the white background color.. thanks

l8ter

Posted
please help, i know alot of people here know CSS very well

Why do you have two body declarations? The first should be used by the body tag but it may be getting overridden by the second. I would remove that one.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted

well i think wht that does is

 

background in the BODY puts color outside the area of the website

 

while background in .body gives border, and colors space above header and below footer.

 

I tried by removing .body , it dint work, and also i removed BODY ,copying background-image to .body still dint work

 

 

any suggesstions

l8ter

Posted

Dump the contrib used to center the shop and use this one instead

 

Fixed Width Site using CSS

 

Then you will be able to put your 'background-image' in the BODY class.

 

with Regards

 

Mark

Lifes a bitch, then you marry one, then you die!

Posted

background: url(images/bg.gif);

 

Should work. :D

Posted

mark the contri u told were the same one i was using but instead of fixbody she called it .body. anyway i dint have any luck with it.

l8ter

Posted

sorry to say guys neither of the suggesstions worked, i now think its a waste of time walking behind this tiny piece of code...

l8ter

Posted

If you have installed the contrib that I suggested then this is what your stylesheet should look like after you have added the background-image class to the body tag.

 

BODY {
 text-align: center;
 background-image: url(images/background.gif);
 color: #000000; 
 margin: 0px;
}

.fixcenter {
 width: 758px;
 border: solid; border-width: 1px;
 background: #ffffff;
 color: #003466;
 margin: auto;
 margin-top: 20px;
 text-align: left;
}

 

This does work because I have just done it again to be sure.

 

Mark

Lifes a bitch, then you marry one, then you die!

Posted

thanks mark, i found out my problem , i did some changes in index.php due to which its not showing the image, but in product.info i dint make any changes so its showing up in that page... thanks guys

l8ter

Archived

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

×
×
  • Create New...