Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Where is the closing div for #MainWrapper?

Where is the closing div for #MainWrapper?

Locked

Views: 979

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
23 Nov 2010, 5:17 PM
#1
jami1955 avatar

jami1955

New Zenner

Join Date:
Feb 2008
Location:
Boulder, CO, Dec 2: India
Posts:
89
Plugin Contributions:
0

Where is the closing div for #MainWrapper?

Version 1.3.9h
In the file tpl_main_page.php in my theme the mainwrapper starts with this tag:

<div id="mainWrapper">

Where is the closing div for that tag?

Thanks; thought that would be listed somewhere but no search turned it up. I want to put a static image behind the mainwrapper that stretches all the way from header to footer, and a div behind that one with a repeated image in case the main wrapper goes taller than the static image. So I need to put those two divs behind the mainWrapper, and in order to do that I need the closing div location.

thanks
JSC

23 Nov 2010, 5:49 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Where is the closing div for #MainWrapper?

Attach the image to the body tag in the stylesheet

23 Nov 2010, 11:12 PM
#3
jami1955 avatar

jami1955

New Zenner

Join Date:
Feb 2008
Location:
Boulder, CO, Dec 2: India
Posts:
89
Plugin Contributions:
0

Re: Where is the closing div for #MainWrapper?

kobra:

Attach the image to the body tag in the stylesheet

I'd really love to know where the closing div is, I think it's on the same page, but I'd like to be sure.

Your solution would work if the image I'm using is exactly the same width as the content, but it is not, it's wider. So with the content floating with a margin:0 auto; style, if the browser is narrower than the bkgd image I attach to the body, the content will slide away from the image attached to the body, and it cannot do that, it has to relate to the image exactly.

Thanks for the suggestion tho.

JSC

23 Nov 2010, 11:42 PM
#4
jami1955 avatar

jami1955

New Zenner

Join Date:
Feb 2008
Location:
Boulder, CO, Dec 2: India
Posts:
89
Plugin Contributions:
0

Re: Where is the closing div for #MainWrapper?

Answer: the closing div is on the same page lower down:
tpl_main_page.php

I did what I was thinking, it works beautifully, proving that is in fact the closing div, as in FF, and IE it works. I added two divs behind the #mainWrapper div, floated all three in the middle with margin:0, auto; and they all float together. The two outer divs are wider than the content div, the first div behind is the static image with fixed height, the second div behind is a slice of the bottom of the first bkgd div, whic repeats y so that if the content gets taller than the static image, that repeated image fills in until the bottom of the frame is reached.
So I get the wider image with about 100px of border on each side of the main content, which was what I was after.

item resolved. :yes:

JSC

24 Nov 2010, 12:00 AM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Where is the closing div for #MainWrapper?

Glad you sussed this your way

Your solution would work if the image I'm using is exactly the same width as the content, but it is not, it's wider
This is not exactly correct and the easier way to accomplish what you did

You just add say 1000px to the bottom of the image or more if necessary to the remainder will bleed off
If the image is wider and needs to be centered you position it

Another alternative is to fix the background position