Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Page background vs shopping cart background


Guest

Recommended Posts

Posted

I have change the shopping cart table width to 770 pixels and centered it on the page.

 

I want to set an image as the page background, but can't figure out where the coding should go.

 

If I add it to includes/header.php it sets the background for the shopping cart as well.

 

If I add it to the stylesheet it does the same.

 

Basicly the oscommerce cart is fine, I just want to change the page background to an image, and can't figure it out.

Posted

Hi,

This will be found in your stylesheet code something like this at the top of stylesheet will be everything outside the 770 pixels.

Just watch the code (background-repeat: repeat-y;) you probably will not need

 

BODY {

background-image: url(/images/background1.jpg);

background-repeat: repeat-y;

color: rgb(20, 92, 29);

margin: 10px;

}

 

Back up your stylesheet and experiment a bit if the shopping cart is also changing check to see if the it is set to transparent in the stylesheets

To improve is to change; to be perfect is to change often.

 

Posted

Hi,

This will be found in your stylesheet code something like this at the top of stylesheet will be everything outside the 770 pixels.

Just watch the code (background-repeat: repeat-y;) you probably will not need

 

BODY {

background-image: url(/images/background1.jpg);

background-repeat: repeat-y;

color: rgb(20, 92, 29);

margin: 10px;

}

 

Back up your stylesheet and experiment a bit if the shopping cart is also changing check to see if the it is set to transparent in the stylesheets

Posted

The only way the BODY style changes is if I add the background image and the margin, but nothing else.

 

So:

 

BODY {

background-image: url(/images/ftb-tile4.jpg);

background: #ffffff;

color: #000000;

margin: 10px;

 

}

 

still keeps the white background throughout.

 

Like this:

 

BODY {

background-image: url(/images/ftb-tile4.jpg);

margin: 10px;

 

}

 

gives me the background that I want, but now the areas behind the boxes i.e. the shopping cart now also has this background.

 

The repeat coding doesn't do anything, so I left that out.

 

What other stylesheets are there? I found the admin stylesheet, but figure that won't change the site. I also found a calender.css, and can't see how that would change anything.

 

I'm afraid I'm stuck. Any help would be appreciated.

 

I have now got the cart at a width of 880 pixels, which looks better to me. The only styling I still need is the page background. How do I change the transparency of the cart?

Posted

i inserted a container into all my pages

 

using dreamweaver, do a 'find and replace' on 'entire current local site' ... find "<body"...

 

on all those pages.... insert a container like so

 

<body blah blah>

 

<div id="container">

 

CONTENT CONTENT PHP PHP

 

</div>

 

</body>

 

then, with the container...specify the width you want it to be, and add a background color or background image.... like i have done...

 

http://atwchrome.jp-clients.com/catalog/

 

hope this helps..

Posted

Thanks eastcoastsupremecy

 

I used this to solve my problem:

 

Remember to first change your table width by following the instructions from the knowledgebase article, also in the downloaded documentation on page 56. I used 880 pixels for my table width, not 770.

 

Then open your stylesheet.css file:

 

Replace the following code:

---------------------------

 

BODY {

background: #ffffff;

color: #000000;

margin: 0px;

}

 

with:

-----

 

BODY {

text-align: center;

background: #ffffff;

color: #000000;

margin: 0px;

}

 

.fixcenter {

width: 880px;

border: solid; border-width: 1px;

background: #ffffff;

color: #000000;

margin: auto;

margin-top: 20px;

text-align: left;

}

 

 

 

In /catalog/includes/header.php

-------------------------------

immediately below this piece of code

 

if ($messageStack->size('header') > 0) {

echo $messageStack->output('header');

}

?>

 

add

 

<div class="fixcenter">

 

In catalog/includes/footer.php

------------------------------

 

Immediately below the closing php tag

 

?>

 

add this

 

</div>

 

I took the above from the contribution http://www.oscommerce.com/community/contributions,2710

 

Hope this helps someone else battling with the same issue. And thanks to those who tried to help me - much appreciated.

Archived

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

×
×
  • Create New...