Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
929 views
in Q2A Core by
edited by

Hi,

since a few hours I'm trying to solve discrepancies between FF and IE and a simple switch to standard mode (in IE dev tools) made it.

What link I've to put in doctype to have this set as default?

## I tried different doctypes such as

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

but the website keeps showing in quirks mode in IE 8.

 

### solved

byte order marks all across the modified core files :-)

by
edited by
How do You know that it is quirks mode and not ie 8 "almost standards mode" ?

Try the first declaration with strict in place of loose, this should show the ie 8 standard mode.

Further reading: http://hsivonen.iki.fi/doctype/

See the expressions table close to the end of the site.

To show Your site in ie 7 standards mode You can add a meta tag as explained on the following site:

http://expression.microsoft.com/en-us/dd835379.aspx
by
edited by
Hi. IE 8 Dev Tools displays quirks mode. when I change back to IE 8 Standard manually, the css problems are gone for me, but other ppl will still see the issues (e.g. incorrect answer-count-box width/hight)

I validated the site and I get following error:
Line 1, Column 1: character "" not allowed in prolog

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w…


I tried with and without replacing the doctype function in qa-theme. Didnt work. I also cant see any space in line 1 column 1 when I check the source code in IE / FF.
by
edited by
I have limited knowledge only, but this could be a result of using an editor which lets some invisible marks in that file. In this case You can make them visible by using an hex editor. You as well would have to use a good utf-8 editor like notepad++ to encode the file as utf-8.

With the normal notepad You cant delete this mark and as well not see it.

Regarding the IE8 thing.

Did You change the answer box css or is it still the original one ?
May be this as well can be changed by using other css.

I thought I was using IE7 but no, I as well use IE8 and I do not have any differences between the different explorers, if You changed the css it could be helpful to see it one time, may be someone knows what to do.

EDIT: In my case everything validates fine at the beginning of the file at least.

1 Answer

0 votes
by

You can try this as the doctype:

<!DOCTYPE html>

That puts IE into standards mode, and is much shorter and easier to remember (and future-proof!)

The validation error sounds like you are outputting some content before the doctype, which is not allowed (not even spaces). Assuming you are using a custom theme, try copy-pasting this code for the doctype function:

 

function doctype()
{
    $this->output( '<!DOCTYPE html>' );
}
 
...