PDA

View Full Version : big problem with template instances


garfy
01-17-2012, 09:25 AM
validator says my site is going into quirk mode when using IE, dunno what that means exactly but the layout in IE is totally damaged.

What happened that the instance for meta tags jumped in front of doc type when i saved the html file. In template it is after doc type, but when i update html pages from that template, it jumps to the first line of code

why?? I am trying to solve this for 1 day already

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.numerologija.org&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.2

And here is original header

<!doctype html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- TemplateBeginEditable name="head" -->
<title>tetielnkeh uheiruhsiurhsuhrseuh</title>

<meta name="keywords" content="xxxxxxxxxxxxxxxx" />xxxxxxxxxxxxxxxxx"/>

<link rel="stylesheet" type="text/css" href="../numerologija.css" media="all" />
<!-- TemplateEndEditable -->

Ricky55
01-17-2012, 10:21 AM
Its because you haven't specified a doctype or document type.

Most people these days are using the HTML5 doctype. I certainly do.

Add this to the very top of your page, before anything else.

<!DOCTYPE html>
<html lang=en>

Ricky55
01-17-2012, 10:23 AM
Sorry I just assumed that the site was in english replace the en with your language.

http://www.w3.org/TR/html4/struct/dirlang.html

garfy
01-17-2012, 10:23 AM
but i have this in first line of template, that is same as you posted

<!doctype html><head>

Ricky55
01-17-2012, 04:23 PM
Sorry mate yes you have, I didn't see it as it was pushed to the side.

This needs to be the first thing on the page though and its not currently.

Your page must start with the doctype.

When I view the source on that page it starts with

<!-- InstanceBegin template="Templates/osnovna.dwt" codeOutsideHTMLIsLocked="false" --><!DOCTYPE HTML>

The validator is actually correctly detecting the document has HTML5 but IE will always revert to quirks mode if it doesn't see the doctype from the get go.

You also need the

<html lang=en>

With your language.

I wouldn't recommend that you use DW templates anyway they really are poor.

Start to use PHP includes instead, they are far simpler and far more reliable and you don't have to rely on DW going forward.

Ricky55
01-17-2012, 04:25 PM
In fact looking at the validation warnings it even tells you what I have just said!!

What is actually in that template for it to start above the doctype?? seems strange.

DWcourse
01-17-2012, 04:37 PM
In fact looking at the validation warnings it even tells you what I have just said!!

What is actually in that template for it to start above the doctype?? seems strange.

It is odd. DW templates should have that line after the DOCTYPE declaration and <html> tag but before the <head> tag