Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Does osCommerce use a wrong definition for DOCTYPE?? IE7 chokes!


MelissaBR

Recommended Posts

Hi all,

 

I've run into issues with IE7 and I've narrowed the problem down to osCommerce's DOCTYPE definition. The problem is with this line:

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

 

That's not a valid DOCTYPE according to W3C. The proper DOCTYPE for HTML 4.01 Transitional is:

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional">

 

Is anyone aware of this? I have to now manually remove all //EN entries to get my template working with IE7.

 

Is there an easier fix? Thanks!

Link to comment
Share on other sites

Use this:

<!DOCTYPE html public "-//W3C//DTD HTML 4.01 Transitional//EN"
  "http://www.w3.org/TR/html4/loose.dtd">

However if you have any errors on the page it will show as not valid.

I had to capitalize DOCTYPE for it to work. I use dreamweaver so replacing all doctype(s) in the site with above code was one step.

My Contributions

 

Stylesheet With Descriptions Glassy Grey Boxtops Our Products Meta Tags On The Fly

Password Protect Admin

"No matter where you go....There you are" - Buccaroo Bonsai

Link to comment
Share on other sites

Hi all,

 

I've run into issues with IE7 and I've narrowed the problem down to osCommerce's DOCTYPE definition. The problem is with this line:

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

 

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional">

 

It is a valid doc type there both the same. Its your system or your host that is the problem. Anything following // is not supposed to be read. I checked most of the first page of live stores they all have the doctype with //EN . So do you not think if that was wrong and kept a site from working that it would not have been fixed with all these shops running?

http://shops.oscommerce.com/ have a look.

Link to comment
Share on other sites

  • 3 years later...

Hi all,

 

I've run into issues with IE7 and I've narrowed the problem down to osCommerce's DOCTYPE definition. The problem is with this line:

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">

 

That's not a valid DOCTYPE according to W3C. The proper DOCTYPE for HTML 4.01 Transitional is:

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional">

 

Is anyone aware of this? I have to now manually remove all //EN entries to get my template working with IE7.

 

Is there an easier fix? Thanks!

I had a doctype problem which was causing layout issues as well and found a solution which I'd like to share. I'm using OSC v2.2 and STS template system. I had problems to center my shop when using Internet Explorer because of the doctype problem.

I tried about 39 different doctypes and finally this one worked:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

 

Take care: Do never place any other HTML (not even commented out lines) before this line, otherwise Internet Explorer will change to another mode and will ignore the following doctype definition. The top of my sts_template.html file now looks like this:

 

<?php DEFINE ('STS_END_CHAR', '$'); ?>

<?php DEFINE ('STS_CONTENT_END_CHAR', '$'); ?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html $htmlparams$>

<head>
$warning_header$
$headcontent$

 

Hope this helps...

Link to comment
Share on other sites

Here is a fairly decent explanation of the doctype. Also note the w3.org web address needs to be included, as in Mazi's example above.

 

http://www.w3schools.com/tags/tag_doctype.asp

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...