Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Changing the background color of EZ Pages and other center content?

Changing the background color of EZ Pages and other center content?

Started by dmcracing on 14 Nov 2011, 6:08 PM · Views: 869

Results 1 to 6 of 6
14 Nov 2011, 6:08 PM
#1
dmcracing avatar

dmcracing

New Zenner

Join Date:
Sep 2011
Posts:
6
Plugin Contributions:
0

Post #1 by dmcracing

Hi there I am wondering if there is a way to change the background color of the center content pages. I have tried changing everything in the stylesheet from body, mainWrapper, etc.. and I just cannot seem to find what is actually controlling that color. Any ideas?

Site is up at https://www.dmcracing.com/test

Thanks in advance!

14 Nov 2011, 6:19 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Post #2 by fairestcape

In almost all cases, background colours (including images) are controlled in the stylesheets.

ZC ver 1.3.9h will support PAGE SPECIFIC stylesheets, so you can create a stylesheet that will "kick in" when a certain PAGE is being displayed. If you want an exclusive background for a specific page, you will just need to create a stylesheet that has a suitable declaration to call in whatever background you want, positioned in the appropriate DIV (or other defined element).

We achieve this HERE with different HEADER LOGOS for different sports sections.

Instructions on creating page specific (or section-specific) stylesheets are in the CSS README file in the classic template css folder.

14 Nov 2011, 6:45 PM
#4
dmcracing avatar

dmcracing

New Zenner

Join Date:
Sep 2011
Posts:
6
Plugin Contributions:
0

Post #4 by dmcracing

Maybe I explained my problem poorly. Example: If you go to the site, and click on the Contact Us tab, how do I change that background from white, or off-white, to something different.

I can change text size, color, etc using the .body in the css, so I assumed adding a background color rule to that would accomplish the task. I also tried #mainWrapper, and a few others, but nothing seems to work.

I just want to make a site wide change to make all pages display a black or dark grey background.

Thanks

14 Nov 2011, 7:32 PM
#5
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Post #5 by gjh42

Many of your pages (not all) have a container named .centerBoxWrapperBody inside the center column div with the id.

.centerBoxWrapperBody {
	background:#fff;
	border:solid 1px #dcdada;
	padding:10px 0 20px 0;
	overflow:hidden;
	zoom:1;
	border-top:none;
	margin:0 0 11px 0;
}
```Change that (and its text color) as desired. There may be other elements that have text colors set; I didn't check for those.
14 Nov 2011, 7:45 PM
#6
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Post #6 by stevesh

Also install the Firefox browser and the Web Developer plugin for Firefox. You can use those to see where in the stylesheet you change the styling of the various page elements.

Ctrl-Shift-Y will allow you to hover over a section of the page and see the class and id names for that section in the box at the top. The statements in the stylesheet that begin with # are id's and the ones that begin with dots are classes.

Ctrl-Shift-E will open the CSS editor and allow you to edit the stylesheet and see the changes in real time without changing anything permanently. An essential tool.

Some prefer Firebug, which does much the same thing.

(If you're using Firefox 4-8, you'll need to remap the editor shortcut, since Firefox has appropriated Ctrl-Shift-E for an internal function - I use Ctrl-Shift-Q.)