...

View Full Version : Doc Type



xdous
10-23-2007, 03:17 PM
Why when i add a doc type to my website do all the fonts get bigger?

I have tried adjusting them in the css but they remain big??

The doc type i am using is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Please help me!

effpeetee
10-23-2007, 03:21 PM
Why when i add a doc type to my website do all the fonts get bigger?

I have tried adjusting them in the css but they remain big??

The doc type i am using is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Please help me!
What Browser?

Frank

xdous
10-23-2007, 03:23 PM
Sorry it works in IE 7 but not in firefox

jlhaslip
10-23-2007, 03:30 PM
Adding the Doctype changes the "rules" used by your site.

If you post a link to your site, someone may be able to offer some assistance.

xdous
10-23-2007, 03:35 PM
The link to the website is http://outdoor-signs.co.uk/

jlhaslip
10-23-2007, 03:51 PM
You can use the h1 - h6 tags to change font sizes and give your page content some semantic structure at the same time.

For the Main content area, change the font sizes by altering the css file p and p2 classes.

xdous
10-23-2007, 04:15 PM
When you say semantic structure do you mean make my code neater?

If so then i have done this now.

You think i should use h tags to re size text?

CFMaBiSmAd
10-23-2007, 04:20 PM
Just adding a doctype does not make your page valid code. Forcing the XHTML Strict doctype that you posted in your first post, results 103 errors on your page.

http://validator.w3.org/

xdous
10-23-2007, 04:32 PM
I know it doesnt make it doesnt mean my website is valid. I just want to add the doctype.

I have validated webpages before. I was just querying why the font changes.

CFMaBiSmAd
10-23-2007, 04:44 PM
As jlhaslip wrote -
Adding the Doctype changes the "rules" used by your site.There are a number of font size related CSS errors as well and warnings that indicate class names are not being recognized and applied that will get interpreted differently depending on what mode/mood the browser is in - http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Foutdoor-signs.co.uk%2F&warning=1&profile=css21&usermedium=all

When there are errors present that effect how or even if a browser sees and interprets the code and css, anything can happen. Make the page valid code first, then address any font size problems. Otherwise you will just be spinning your wheels fixing symptoms that will keep changing as other things get fixed.

effpeetee
10-23-2007, 05:16 PM
http://creativecoding.webforumz.com/articles/semantics.php

You may find this site useful.

Frank

xdous
10-23-2007, 06:19 PM
Thanks for this link.

Makes more sense.

But I dont see why my code is that bad.

I cant seem to find anything that says my code is not semantic web design whats everyone elses thoughts?

effpeetee
10-23-2007, 06:31 PM
Just a thought-

Have you tried to validate your code.

http://validator.w3.org/

It is free. If it's any comfort; I have trouble with this semantic thing.

Have a look at the url in my signature. There's plenty of stuff there.

Frank

VIPStephan
10-23-2007, 08:06 PM
Just a thought-
Have you tried to validate your code.
http://validator.w3.org/
It is free. If it's any comfort; I have trouble with this semantic thing.
Have a look at the url in my signature. There's plenty of stuff there.
Frank

Just a hint: CFMÖwhatever has already found faults with his code a couple of posts before and advised him do validate, and if xdous is refusing to clean up that mess then thereís no help for him.

xdous: Your code is very, very, very far from being semantic. Before asking why you should learn what ďsemanticĒ actually means. Wikipedia (http://en.wikipedia.org/wiki/Semantics) is the first source for such definitions. Secondly you need to understand what semantic code (http://www.boagworld.com/archives/2005/11/semantic_code_what_why_how.html) actually is. One thing that is definitely not semantic is using tables to create a page layout (http://www.hotdesign.com/seybold/) (which you did).

And also: valid code is a huge help to find out why strange things are happening. If your code is valid and semantic you can at least exclude errors in the code itself being the cause of a problem.

xdous
10-24-2007, 10:43 AM
Cheers VIP. The link effpeetee sent me explains what semantic code is. And if you read this and look at my code im not really doing nothing wrong. I dont want my page to be xhtml strict.

I want it to be xhtml transitional which allows you to use tables which is why i have.

I have made a perfect xhtml strict page in the passed which passed all validation so i know how to do this but for this site i did not want to.

So cheers for your comment though .

Fang
10-24-2007, 10:46 AM
I want it to be xhtml transitional which allows you to use tables which is why i have. :confused: DTD comparison
(http://www.blackwidows.co.uk/resources/tutorials/xhtml/element-comparison.php)

xdous
10-24-2007, 11:26 AM
Cheers for all your comments but i have now sorted out my font sizing problem for both ff and ie.

For reference you need to put for example:

body {
font-size: 11px !important;
font-size: 9px;
}

Seems to work. But if theres any other ideas please let me know.

I

xdous
10-24-2007, 11:28 AM
Cheers for all you comments.
I have now sorted out my font sizes in both ff and ie. I out this in my css code:

body {
font-size: 11px !important;
font-size: 9px;
}

It does work but if any1 else has any other ways please let me know.

Cheers

VIPStephan
10-24-2007, 02:38 PM
Cheers VIP. The link effpeetee sent me explains what semantic code is. And if you read this and look at my code im not really doing nothing wrong. I dont want my page to be xhtml strict.

I want it to be xhtml transitional which allows you to use tables which is why i have.

I have made a perfect xhtml strict page in the passed which passed all validation so i know how to do this but for this site i did not want to.

So cheers for your comment though .

Donít confuse semantic code and valid code. You can still use tables in (X)HTML strict. Tables are perfectly valid in any way you use them. However, tables are not semantic if you use them to create a page layout (as I already stated). Tables are meant for tabluar data only (i.e. telephone directories, sports results, stock exchange tables or similar). And transitional or strict doctype, your page is still far from being semantic (at least it was last time I checked).

And actually you donít have any choice. Strict is your only option if you are creating new websites and care for standards compliant code. If you donít care you donít have to use a doctype at all. Transitional is crap. Transitional is nothing. Transitional is just an excuse to show a ďvalidĒ sign on crappy, messy, sloppy, unprofessional code. But as I said: If you are writing crappy, non-sematic code you donít have to put a doctype in the first place because you arenít adhering to standards anyway.

A transitional doctype was actually meant for the transition of an old, not standards compliant website to a standards compliant website. That means if you had a website without doctpye before web standards were established you were allowed to put that doctype as long as you are in the process of transitioning that site to one that is conforming to the actual, real, strict standards.

So actually, if you create a new website, itís not on you to choose if itís supposed to have a strict or transitional doctype, strict is mandatory and the only option you have Ė or you write tag soup and forget about the standards and any doctype right away.

Hope that clarifies some unfortunately too common misconceptions.

CFMaBiSmAd
10-24-2007, 03:29 PM
LOL, If you specifically did not want to use STRICT, then you probably should not have used the STRICT doctype -
The doc type i am using is <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

Please help me!We can't help you if what you are doing is exactly what you say you don't want to do... "Know thy own code." :eek:

jerry62704
10-24-2007, 08:12 PM
Tables can be the correct object to use such as in the case of showing the relationship of items like a spreadsheet. But they are wrong if they are only there to position things on the page. If you have ever listened to a page (JAWS) that has tables, you know the problems they cause. Worth it when the meaning is greater than the pain in the butt aspects.

Just my $.02.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum