Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / My site isn't aligned properly

My site isn't aligned properly

Views: 1,693

Results 1 to 20 of 23
8 Nov 2011, 2:35 PM
#1
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

My site isn't aligned properly

Can anyone help me figure out why my site isn't aligned properly in IE?

The menu is out of whack with the rest and the body is aligned left.

8 Nov 2011, 2:42 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: My site isn't aligned properly

What site?

8 Nov 2011, 2:45 PM
#3
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: My site isn't aligned properly

Guess I should have a second coffee!

familynow.ca

8 Nov 2011, 2:51 PM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: My site isn't aligned properly

Oh dear... another victim of Template Monster...

Sorry, but these templates are notoriously awful (code-wise). It can take even an experienced zenner HOURS to unpick them.

Best call for help from the rogues who sold it to you.

The forum is littered with tearful posts from people seeking help with TM errors...

Trouble is, these templates by-pass / disable / wreck so much core ZC stuff, it's often very difficult to see where problems lie. Additionally, they can be virtually impossible to accommodate for upgrades, additional modules, etc.

8 Nov 2011, 3:01 PM
#5
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: My site isn't aligned properly

Agreed. But I'm 100% certain this is something I did since it worked fine just a short while ago. I don't use IE so I tend only load my site in IE when I make a significant change -I realize I should make a habit of checking it at every change but...

This particular TM tpl can't be all that bad if I, being not very knowledgeable, can sort out most of the issue. I know ppl here don't like them but it would have cost me TONS to get the same from a designer and in TMs defense it would necessarily be a given that said designer would have followed ALL standards set out by ZC.

Anyway. Any insight/advise on where to point myself would REALLY be appreciated.

8 Nov 2011, 3:13 PM
#6
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: My site isn't aligned properly

Agreed. But I'm 100% certain this is something I did since it worked fine just a short while ago. I don't use IE so I tend only load my site in IE when I make a significant change -I realize I should make a habit of checking it at every change but...

If you are sure it is something you did yourself, then I recommend to compare your files against the files from TM and find the differences.

8 Nov 2011, 3:16 PM
#7
dgent avatar

dgent

Totally Zenned

Join Date:
Nov 2009
Location:
UK
Posts:
1,117
Plugin Contributions:
0

Re: My site isn't aligned properly

In your stylesheet...

.main-width { width:950px; margin:0 auto; text-align:left;}

Im sure it should say..

.main-width { width:950px; margin:auto; text-align:left;}

8 Nov 2011, 3:17 PM
#8
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: My site isn't aligned properly

hm. Yes. That even makes sense to me. I'll give that a whirl right now.

8 Nov 2011, 3:21 PM
#9
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: My site isn't aligned properly

Doesn't seem to have made a difference.

8 Nov 2011, 3:31 PM
#10
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: My site isn't aligned properly

Seems as though there might be an open tag somewhere since the bg for the body isn't showing everywhere. Dunno if that sends anyone some red flags or not...

8 Nov 2011, 3:47 PM
#11
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,084
Plugin Contributions:
56

Re: My site isn't aligned properly

Running your site's main page through the W3C validator shows:

Line 264, Column 163: end tag for element "li" which is not open

…cgo2deo5o69gd1a5rijsbk0">Women's Health</a></li></ul></li>            </li>

✉

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occurred in a script section of your document, you should probably read this FAQ entry.

I don't know if that's the source of your problem ...

8 Nov 2011, 4:04 PM
#12
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: My site isn't aligned properly

Yeah. I was aware of that. I can't wrap my brain around that one since the list is generated. Why the heck would it add a extra </li> just cuz if it's php generated!? None of the other menus show that error. If it were all of them I could understand.

8 Nov 2011, 4:05 PM
#13
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: My site isn't aligned properly

All I could think of to rectify that was to be certain the ' is escaped properly.

8 Nov 2011, 4:12 PM
#14
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: My site isn't aligned properly

What about this? This bit was suggested to me to line up the menu so it didn't span off the page. Maybe I made a typo in copying it?

/* BOF bit of code to prevent submenu from overlapping screens at low res*/
#dropMenu>ul>li+li+li+li+li+li>ul {
left: -4em !important;
}
#dropMenu>ul>li+li+li+li+li+li+li>ul {
left: -12em !important;
}
#dropMenu>ul>li+li+li+li+li+li+li+li>ul {
left: -20em !important;
}
#dropMenu>ul>li+li+li+li+li+li+li+li+li>ul {
left: -28em !important;
}#dropMenu>ul>li+li+li+li+li+li+li+li+li+li>ul {
left: -1.9em !important;
}
/* EOF bit of code to prevent submenu from overlapping screens at low res*/

That's the onyl place I can think of that would affect the ul generator code

8 Nov 2011, 4:32 PM
#15
gjh42 avatar

gjh42

Black Belt

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

Re: My site isn't aligned properly

That CSS can have no effect whatsoever on the ul generator code. It merely styles the output, it doesn't change the HTML source at all.

BTW, margin:0 auto; is a perfectly valid declaration, giving 0 margins at top & bottom and auto at sides. It may even be more "correct" than just "auto", though it doesn't really make a difference.

All I could think of to rectify that was to be certain the ' is escaped properly.An unescaped quote ' in text could definitely cause an error. The exact error would depend completely on the circumstances.

8 Nov 2011, 4:37 PM
#16
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: My site isn't aligned properly

gjh42:

That CSS can have no effect whatsoever on the ul generator code. It merely styles the output, it doesn't change the HTML source at all.

Yeah. I pretty much knew that but I'm at such a loss and ppl hear are being so kind in trying to help I thought I put as much info out there as I could think of.

gjh42:

BTW, margin:0 auto; is a perfectly valid declaration, giving 0 margins at top & bottom and auto at sides. It may even be more "correct" than just "auto", though it doesn't really make a difference.
At first thought it looked like a typo but I realized a minute ago it actually does makes to have 0 auto; Would 0em auto; be more exact?

gjh42:

An unescaped quote ' in text could definitely cause an error. The exact error would depend completely on the circumstances.
I'll double check that one again to eliminate it as a variable for certain.

Thanks!

8 Nov 2011, 4:41 PM
#17
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: My site isn't aligned properly

Okay so:

Women's Health

Is definitely escaped.

8 Nov 2011, 4:43 PM
#18
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: My site isn't aligned properly

I also brought:

}#dropMenu>ul>li+li+li+li+li+li+li+li+li+li>ul {

down to a new line. Even-though I imagine it's parsed all in one line anyways.

8 Nov 2011, 4:53 PM
#19
gjh42 avatar

gjh42

Black Belt

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

Re: My site isn't aligned properly

}#dropMenu>ul>li+li+li+li+li+li+li+li+li+li>ul {

makes no difference to code parsing, but

}
#dropMenu>ul>li+li+li+li+li+li+li+li+li+li>ul {

is certainly easier to read.

Would 0em auto; be more exact?No, when a value is 0, units are not required and there is no reason to use them.

8 Nov 2011, 8:05 PM
#20
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: My site isn't aligned properly

gjh42:

No, when a value is 0, units are not required and there is no reason to use them.

Thank you for confirming that.

So the only thing left that came to mind was looking through the ul generator php file. I started by comparing it to an old backup file since this effect wasn't occurring before.

Aside from that I really haven't a clue!?