Guest Posted October 21, 2009 Posted October 21, 2009 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.
Guest Posted October 21, 2009 Posted October 21, 2009 http://addons.oscommerce.com/info/6764 Tried, but didn't work. I have reverted back to my backup - hopefully someone will have advice. I did the centre site using the Setting Table Width on page 56 of the documentation.
♥joli1811 Posted October 22, 2009 Posted October 22, 2009 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.
Guest Posted October 22, 2009 Posted October 22, 2009 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
Guest Posted October 22, 2009 Posted October 22, 2009 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?
eastcoastsupremacy Posted October 22, 2009 Posted October 22, 2009 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..
Guest Posted October 22, 2009 Posted October 22, 2009 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.
eastcoastsupremacy Posted October 22, 2009 Posted October 22, 2009 looks like you did what i told you, just a little differently. good job tho :)
Recommended Posts
Archived
This topic is now archived and is closed to further replies.