Link to home
Start Free TrialLog in
Avatar of Mike Kristensen
Mike Kristensen

asked on

Wordpress and DOCTYPE

Hello all.

Im trying to make a homepage in Wordpress. I do alot of editing with the theme, and therefore also having problems with the DOCTYPE.

Here is the page: http://www.mikethk.dk/kontakt/

Try it in Explorer then in some other browsers. The text changes, and the font size aswell.

I prefer the Explorer look. . . Just more beautiful. . .

But is there a rule in Wordpress to make the DOCTYPE Work? I added DOCTYPE to the page template, but also in the actual page ("kontakt").

Hope you can point me in some direction.

Best regards Mikethk
Avatar of Mike Kristensen
Mike Kristensen

ASKER

If i remove the DOCTYPE from the page, template and header. .. . I wont see any difference.

I think im missing some point here??????
Avatar of Jason C. Levine
The DOCTYPE declaration should be added to the header.php file in the theme and nowhere else.  What you have done is create validation errors on the page and you need to fix those.
So what do i have to do exactly?

Could you go into small details? Just a bit. I have a hard time understanding it.

For now, i tried to delete ALL DOCTYPE's and only put it in the header file. Didnt work.

This is what i put: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
I can't do it all for you because a lot of it depends on how your theme is constructed. Are you using a theme that's freely available to download?  

In most themes, the header.php contains the opening <html> tag and you insert the doctype command above that.  However, if the theme is composed of multiple template parts, there may be an overarching index.php file that contains that section.

If you are able to locate the opening <html> and you are inserting your preferred doctype but it doesn't show up when you browse the site that may be due to browser or site caching or you're editing the wrong file.
By the way, when I access your site this is what I see in the source code:

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

Open in new window


So I think you've done it correctly.  If you aren't seeing that it is likely a caching issue.
So there might be another DOCTYPE which work?

How can i pick something i want? This page shows alot of DOCTYPES: http://www.w3.org/QA/2002/04/valid-dtd-list.html

Which one should i pick?



To be more accurate it is the font that sucks.... Its not the same, size is different or something.... How can i fix this? Its a MAJOR problem, EVERYONE must have this issiue.
Hey, you asked about how to edit the doctype, so I told you.

I am assuming you know what the doctype is and what it does (controls validation) and thus you had your reasons for using it.  If you are wondering why the browsers display different things, that's a totally different (and unrelated to WordPress) question.
Oki...... But DOCTYPES are still made so things will show equally on all browsers? At least i thought so.

I picked that DOCTYPE, cause i used it for another website.


But oki, i might not be able to understand and fix this FONT issue, i never did. . . But im just tired of using millions of years trying to fix ridicules things that is completely ridicules.

In the end, website creations can only be done by 2 kind of people....
1. Those who do it for living.
2. Those who use Wordpress and SUCK at website programming.

Im just saying. VERY WELL DONE MS, GOOGLE, MOZILLA, OPERA, SAFARI, PUFFIN and all those browser idiots.

Im so pissed. . . How can anyone be creative, when you arent allowed to? I guess i will just click some theme and start add some text.

The website is not a theme, its my website in Wordpress. . . My own theme i guees.
ASKER CERTIFIED SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
So what you say is, that even if i validate my whole page, i still have to change margin in 1 browser, and not for the other?

I will now validate my homepage and make it 100% correct and then correct it thereafter. ? NO?
I've requested that this question be closed as follows:

Accepted answer: 0 points for Mikethk's comment #a39462100

for the following reason:

Sweet mama child oh mine.
You may have to change the margin, you may not.  And close your questions properly.