Mambo forums
Forum Home Register Forum Rules FAQ Search Today's Posts Mark Forums Read

Go Back   Mambo CMS Forum > Mambo 3rd Party Extensions > Mambo Templates
 

IE 7 and Water & Stone problem?

This is a discussion on IE 7 and Water & Stone problem? within the Mambo Templates forums for Mambo.

Reply
 
Thread Tools
Old 08-01-2007, 10:45 PM   #1
ckleiman
Mambo Fan
 
Join Date: Jan 2007
Posts: 59
Resolved IE 7 and Water & Stone problem?

Hi all!

Recently installed IE7. Then, I went to my site, which, uses the Water & Stone template. IE7 is doing something causing a #666666 colored partial section to appear. I've outlined in red in the attached screen shot.

Firefox looks ok.

Anybody have any idea(s) how to fix? If you have IE7 installed my url is www.vityusa.com
Attached Files
File Type: zip ie7.zip (176.3 KB, 23 views)

Last edited by ckleiman; 09-01-2007 at 03:25 AM. Reason: added website url
ckleiman is offline   Reply With Quote
Old 09-01-2007, 03:44 AM   #2
ckleiman
Mambo Fan
 
Join Date: Jan 2007
Posts: 59
IE7 problem solved!!!

I found solution at Mamboteam and want to share! You just need to put this code on line 1 of the template index.php;

<!--IE 7 quirks mode please-->

For the full thread discussion on this topic click here;

mamboteam.com

You may need to login. Happy Mambo!
ckleiman is offline   Reply With Quote
Old 14-02-2007, 06:39 AM   #3
hwang
Mambo Fan
 
Join Date: Oct 2006
Posts: 98
Originally Posted by ckleiman View Post
<!--IE 7 quirks mode please-->
I fixed the IE7 problem another way, but I don't understand this line. This is very strange! It appears to be a comment, not a code is it? How can a comment make any change to the codes? Can anyone have an explanation please? Thanks!
hwang is offline   Reply With Quote
Old 14-02-2007, 09:40 AM   #4
Elpie
Mambo Guru
Forum Admin
 
Elpie's Avatar
 
Join Date: Jul 2006
Location: New Zealand
Posts: 10,001
Hi hwang. Yes, I can explain this
You are correct, the line is a comment.

IE6 gave template designers the option to render their sites in either standards mode or what is called quirks mode. Quirks mode is a backwards compatible mode, which means that sites that ran under quirks mode had fewer compatibility problems with older versions of IE.

To trigger quirks mode in IE6 all a designer had to do was to include the xml declaration, eg:
Code:
<?xml version="1.0" encoding="utf-8"?>
In IE7, Microsoft removed the ability for the xml declaration to trigger quirks mode. However, because IE7 is still not Standards-compliant (it is marginally better than IE6 in its handling of Standards and css) many sites still need to trigger this backward compatibility mode.

The only way to force IE7 to render a site in quirks mode, without affecting the way other browsers render a site, is by including a comment between the xml declaration and the doctype.

This is done like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<!-- any comment you like will keep IE7 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Is this clear so far?
Now, keep in mind the simple rule:
  1. If your template uses the xml declaration, the comment must come AFTER the xml declaration and before the doctype.
  2. If your template is HTML or XHTML sent as text/html and does NOT use the xml declaration, that is - it starts with the doctype being the first line in the template's index.php, then you place a comment above this. So, the comment will then be the first line in your template's index.php, followed by the doctype.
Both ways will tell IE7 to render the site in quirks mode and will reduce the problems caused by incompatibilities.

You can write anything you like in the comment as long as it is a valid comment and is placed into the correct position in your template's index.php file. Just make the comment meaningful so you will remember why you put it there.
__________________
Mambo Tutorials on:http://lynnepope.net/topics/mambo-tutorials
Mambo wiki: http://mambo-manual.org/
Follow me: http://twitter.com/elpie
Elpie is offline   Reply With Quote
Old 08-03-2007, 08:46 AM   #5
hwang
Mambo Fan
 
Join Date: Oct 2006
Posts: 98
Thanks a lot, Elpie.
I have been too busy, not frequented here these days....
Cheers!
//hwang
hwang is offline   Reply With Quote
Old 16-04-2007, 04:16 PM   #6
mordeth
Mambo Noob
 
Join Date: Apr 2007
Posts: 2
Re: IE 7 and Water & Stone problem?

Ok, so I've added this line to the top of my index.php (running 4.5.5) and this does fix the template problem, but now I get the comment itself appearing at the top left corner of the site (on top of the background color). I thought the browser was supposed to ignore the comment as far as this was concerned.
mordeth is offline   Reply With Quote
Old 16-04-2007, 04:25 PM   #7
mordeth
Mambo Noob
 
Join Date: Apr 2007
Posts: 2
Re: IE 7 and Water & Stone problem?

oh man... I somehow missed a couple of characters out of the comment when copying it. fixed now.
mordeth is offline   Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 07:59 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Mambo Foundation, Inc © 2000 - 2008 All rights reserved. Mambo is Free Software released under the GNU/GPL License.

Managed Servers by DedicatedNOW