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
Mike KristensenIT administratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike KristensenIT administratorAuthor Commented:
If i remove the DOCTYPE from the page, template and header. .. . I wont see any difference.

I think im missing some point here??????
0
Jason C. LevineNo oneCommented:
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.
0
Mike KristensenIT administratorAuthor Commented:
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">
0
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

Jason C. LevineNo oneCommented:
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.
0
Jason C. LevineNo oneCommented:
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.
0
Mike KristensenIT administratorAuthor Commented:
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.
0
Jason C. LevineNo oneCommented:
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.
0
Mike KristensenIT administratorAuthor Commented:
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.
0
Jason C. LevineNo oneCommented:
But DOCTYPES are still made so things will show equally on all browsers? At least i thought so.

The DOCTYPE sets the expectation for the browsers as to how the HTML will be constructed.  If you don't follow the validation rules, the browsers will go into Quirks Mode and render things as they think it should be rendered.  In your case, you're not even close to valid code:

http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.mikethk.dk%2Fkontakt%2F
http://jigsaw.w3.org/css-validator/validator?profile=css21&warning=0&uri=http%3A%2F%2Fwww.mikethk.dk%2Fkontakt%2F

You need to fix every error listed in those two links before you can expect to see cross-browser displays without issues.  Even so, you still may not see the same display depending on how exactly the HTML and CSS is constructed.  It's possible to have perfect doctype validation and still get slightly different output because you forget to control a margin or font and the browser substitutes its preferred default.

But im just tired of using millions of years trying to fix ridicules things that is completely ridicules.

Well, that's why you have the ability to learn how to do it correctly or hire a developer who already knows how to do this correctly.  Web Development is a skill like any other...it takes time and effort to learn and master.  WordPress is a content management system...it does not confer magical powers upon you and does not correct poor code or poor design.

How can anyone be creative, when you arent allowed to?

You're allowed to be creative.  You just have to learn and follow the rules.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mike KristensenIT administratorAuthor Commented:
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?
0
Mike KristensenIT administratorAuthor Commented:
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.
0
Jason C. LevineNo oneCommented:
You may have to change the margin, you may not.  And close your questions properly.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.