Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Changing Background Colour


col_b

Recommended Posts

Posted

Hi,

 

May I first say how awsome osc is, and how great the forums are.

 

There's one thing that is really making me pull my hair out: changing the background colour of the page. This should be a really simple process I know: altering the background in BODY{} in the stylesheet.

 

But no matter what I do, whether it's through the stylesheet, header.php, the background always stays a pale pinky colour. This is with a 900 px wide site, and margins set to auto.

 

The only thing that seems to change the background colour is altering the colour in .infoBoxNoticeContents {background: #FFE6E6;. If I change this, then the background will change, but this changes both the background to the left and right of the main site and the background within the site. I can't seem to alter the background to the page on its own.

 

I know this must sound wierd, but I've searched and played around with this for days, all to no avail. I'm really at a loss.

 

Some expert advice would really be appreciated!

 

Many thanks in advance,

Col

Posted

Where is the 900px width specified? Look for another tag similar to the BODY TAG just above or below and then add

background: #ffffff;

 

to that tag.

Posted
Where is the 900px width specified? Look for another tag similar to the BODY TAG just above or below and then add

background: #ffffff;

 

to that tag.

 

Hi,

 

Thanks for your reply.

 

The 900 px is speciifed in index.php at <table border="0" width="900" cellspacing="3" cellpadding="3"> to set the width of the 'main' part of the site; in header.php at <table border="0" width="900" cellspacing="0" cellpadding="0" background="#ffffff"> for the header, and again for the nav bar. Also in footer.php for the footer.

 

Where should I look for this tag you mention? The stylesheet? The tags run from BODY, A, A:HOVER, FORM... etc. Like I mentioned, the only tag that seems to change the background colour is .infoBoxNoticeContents {}.

 

I know must sound like a real simple problem, but I've been racking my brains for 3 days now.

 

Cheers,

Col

Posted
Hi,

 

Thanks for your reply.

 

The 900 px is speciifed in index.php at <table border="0" width="900" cellspacing="3" cellpadding="3"> to set the width of the 'main' part of the site; in header.php at <table border="0" width="900" cellspacing="0" cellpadding="0" background="#ffffff"> for the header, and again for the nav bar. Also in footer.php for the footer.

 

Where should I look for this tag you mention? The stylesheet? The tags run from BODY, A, A:HOVER, FORM... etc. Like I mentioned, the only tag that seems to change the background colour is .infoBoxNoticeContents {}.

 

I know must sound like a real simple problem, but I've been racking my brains for 3 days now.

 

Cheers,

Col

 

Mods,

 

you can mark this as solved (I think).

 

In <body>, after </head> in index.php we have <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" cclass=".infoBoxNoticeContents">. Change this to class="body" works. Whether this messes something else up remains to be seen.

 

col

Posted

I would suggest doing the following...BACKUP before you do!

 

TO CENTRE AND SIZE YOUR SHOP, follow this instruction:

http://addons.oscommerce.com/info/1485

 

To center & size Shop

 

At the very start of header.php add:

 

<div id="content">

 

then at the very bottom of footer.php add:

 

</div>

 

then add to your css above the BODY TAG:

 

#content {

width: 900; margin: auto;

border: 1px solid #999999;

text-align:center;

background: #ffffff;

}

 

and add to the BODY tag

 

text-align:center;

 

Obviously set width above to whatever you need.

 

Then to change the background colour outside of your content area change the BODY TAG.

To change the background colour inside of your content area change the CONTENT TAG.

Posted
I would suggest doing the following...BACKUP before you do!

 

TO CENTRE AND SIZE YOUR SHOP, follow this instruction:

http://addons.oscommerce.com/info/1485

 

To center & size Shop

 

At the very start of header.php add:

 

<div id="content">

 

then at the very bottom of footer.php add:

 

</div>

 

then add to your css above the BODY TAG:

 

#content {

width: 900; margin: auto;

border: 1px solid #999999;

text-align:center;

background: #ffffff;

}

 

and add to the BODY tag

 

text-align:center;

 

Obviously set width above to whatever you need.

 

Then to change the background colour outside of your content area change the BODY TAG.

To change the background colour inside of your content area change the CONTENT TAG.

 

Hotclutch,

 

That's great dude. Many thanks for your help. :)

 

Col

Archived

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

×
×
  • Create New...