
Originally Posted by
SPH
This looks like the place.
It usually better to start your own thread than to pick up on a half-year old one...
Today I re-discovered a project I began over a year ago with the Mostly Grey template:
As I had said before, you should leave that template where you left it, buried in the past. But, you can learn from it and use it as a test ground, why not?
Now, how might I make the Home, Login...Horiz Cats...top EZpages...footer EZpages fixed to the body width, while leaving the top and bottom full width (so their background colors go full width)? In case that would look better.
You would need to nest another div element inside the parent div and get it centered. So, the parent element would be 100% width, and the child element would be XXX px centered.
In your case, you have #headerWrapper as your parent element and now you would need to add it's child element, ie. #headerWrapperInner. You would add
HTML Code:
<div id="headerWrapperInner">
right after
HTML Code:
<div id="headerWrapper">
in your tpl_header.php file. You would also need to close this new div element before the parent closes. Then, all you need to do is add this to your stylesheet.css
Code:
#headerWrapperInner {
width:1010px;
margin:0 auto;
}
Since you set #contentMainWrapper (basically, your main content area) to 1010px, I used the same value for header. margin line means that top and bottom margin is 0, while left and right margin is automatically determined (element gets centered).
You would do the same with #navCatTabsWrapper and #navCatTabs. The latter is already a child element so you'd just need to add
Code:
#navCatTabs {
width:1010px;
margin:0 auto;
}
to the stylesheet.
I know this might seem frightening at first, but it's actually not. It's really simple, the very basics of HTML/CSS. Once you get the hang of it, you'll see how simple it is...