Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing Background Color without Changing....


danielc1234

Recommended Posts

Posted

I was wondering how to change the background color to a color or an image, but not change the body and tables color. I changed the background in my css file, but it changed the whole website. I just want the background color to be an image and not change the rest of the site.

 

Thanks Daniel

Posted

Hi Daniel,

Add this to your css... I use a background image, though my site is centered at 800px. This should work for you....

 

Cheers,

Mark

 

BODY {

text-align: center;

background:#ffffff url(images/your_image.gif) top center repeat-y;

color: #000000;

margin: 0px;

}

Posted
Hi Daniel,

Add this to your css... I use a background image, though my site is centered at 800px. This should work for you....

 

Cheers,

Mark

 

BODY {

text-align: center;

background:#ffffff url(images/your_image.gif) top center repeat-y;

color: #000000;

margin: 0px;

}

 

I added it just like you said, but look what its doing www.dog-pet-beds.com

It seems to be filling in just the body part. I want it to fill in the outer website space.

Thanks

Posted

Hi,

You need to modify your image. The image I use is a .gif that is white for 798px, and the remainder is coloured... Only 1px high! Done in Photoshop... See for yourself at the website, which is still going through deveopment.... www.diddydonka.com

 

Good luck

Posted

Mark,

That looks great.

I noticed you put this in your css file....

 

.fixcenter {

width: 758px;

border: solid; border-width: 0px;

background: #ffffff;

color: #FD6CC6;

margin: auto;

margin-top: 0px;

text-align: left;

}

 

That is not in my css, is that setting the width of your site and where do you add that into the php files?

Also, if you're not using a % instead of fixed pixels, then your site wont be floating when users adjust their browsers? Just curious and trying to learn as much as I can.

 

Good job on your site by the way.

Daniel

Posted
Mark,

That looks great.

I noticed you put this in your css file....

 

.fixcenter {

width: 758px;

border: solid; border-width: 0px;

background: #ffffff;

color: #FD6CC6;

margin: auto;

margin-top: 0px;

text-align: left;

}

 

That is not in my css, is that setting the width of your site and where do you add that into the php files?

Also, if you're not using a % instead of fixed pixels, then your site wont be floating when users adjust their browsers? Just curious and trying to learn as much as I can.

 

Good job on your site by the way.

Daniel

 

Thanks Daniel.

The CSS is not standard. No PHP needs changing at all, as the stylesheet controls everything. Get the fixed center contribution, and adjust according to your needs, or use mine, as it fully commented! (Meaning it tells you what each bit does!). I stick with fixed pixels, as there is no difference between browsers. And, it accomodates the old resoloutions. I think it's easier, as many prefer this size layout? Your site is a similar size...

The 758px is the site width (for 800x600 screens). I created the image, and adjusted the css to accomodate it. Save the background from my site to see how it was done.... Another website I developed for a client, uses the same principal... www.southwoodfordgalleria.co.uk

In summary, back up your original stylesheet, and use the new one, editing as you go, to achieve desired results...

Very best of luck Daniel,

Mark

Archived

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

×
×
  • Create New...