X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   CSS Background image problems (https://forum.x-cart.com/showthread.php?t=15301)

philipcox 07-18-2005 02:10 PM

CSS Background image problems
 
I am trying to add a background image to my site while keeping the main central body background grey. Here is what I have done:

Added class="MainTable" to the table definition in rectangle_top.tpl.

Added BODY {
MARGIN-TOP: 0 px; MARGIN-BOTTOM: 0 px; MARGIN-LEFT: 0 px; MARGIN-RIGHT: 0 px;
background-image:url(http://server5.alwayswebhosting.com/~mountain/store/skin1/images/img_84.gif);
background-repeat: repeat;
}

to the skin1.css file.

And added


.MainTable {
background-color: #222222;
}

to the skin1.css file.

But all I get is the pattern all over the page. What can I do to fix this?

balinor 07-18-2005 02:14 PM

You need to set the background to not repeat, and position it where you want it.

background-repeat: no-repeat;
background-position: 50% 50%;

philipcox 07-18-2005 02:14 PM

it actually works fine in Firefox, but in Safari it keeps the pattern all over the page. I have even emptied my cache in both browsers.....is there a reason why my CSS changes dont affect how it displays in Safari?

philipcox 07-18-2005 02:15 PM

Here is the URL
http://server5.alwayswebhosting.com/~mountain/store/home.php

balinor 07-18-2005 02:18 PM

Ahhh...I see what you are saying...shows up that way in IE as well....try using the old fashioned

<td bgcolor="#222222"

to rectangle_top and see if that makes a difference.

philipcox 07-18-2005 02:37 PM

no luck. putting <td bgcolor="#222222" in the rectangle_top.tpl table definition just makes Firefox look the same as Safari and IE....repeating pattern all over the page.....any other suggestions?

balinor 07-18-2005 02:45 PM

How about assigning the maintable class to the first table in home.tpl?

philipcox 07-18-2005 02:49 PM

Very close! This is what I get.....now what?
www.mountainhideout.com/example.htm

balinor 07-18-2005 02:55 PM

Assign it to head.tpl as well...

philipcox 07-18-2005 06:01 PM

That fixed that! There is just a small sliver that isnt grey on the bottom, but im ok with it. THANKS!


All times are GMT -8. The time now is 11:10 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.