Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is a DocType really necessary?

Status
Not open for further replies.

Jonnn

Programmer
Nov 17, 2004
135
GB
I have made a website for my pool team.

I have been told that it is important that i have a Doc Type.

Ive spent so long designing it that when i link my page to a doc type many changes occur on my page, size of font colour and much more.

Why is a doc type so neccesary?

Jon .

JavaScript Beginner at work :)
 
The short answer is because Internet Explorer will display in quirks mode. Does your site look the same in IE and Firefox? If it looks the same or you're sure that everyone you expect to use the site has the same browser as you, don't worry about it.
As this is rarely the case, that is just one reason to use a complete and valid doctype.

Also, if you use the HTML transitional doctype. you shouldn't have too many problems.

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
give yourself a complete doctype. then, when you notice changes, post here and we'll help you so that your website looks the same in most (if not all) browsers.

complete doctypes make debugging html much easier, and make for a clean website that you can be sure will look the same for the most amount of people possible.

*cLFlaVA
----------------------------
[tt]a frickin' twelve-gauge, what do you think?[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
thanks for that! i will try some doctypes today and try and alter my code to suit the doctype. I would really love one of them badges on my website hehe :)

I would also like to thank all the people that posted in the doctype thread which was linked by Vragabond.

Thanks alot and let this forum continue to impress me :)

If anyone would like to browse through my code.


Have a nice day


JavaScript Beginner at work :)
 
ok, i have added the XHTML Strict 1.01 Transitional DOCTYPE to my website.

I have tested it on the Main Page...

Everything seems to be fine, apart from the size of my font.

It is has increased in size.

How come my style sheet is controlling

- font colour
- font type

but not font size???

appreciate help here, thanks!

JavaScript Beginner at work :)
 
my css ...

Code:
td.font           { font-family: verdana; font-size: 10; color: green;}
h5.tdhead         { font-family: verdana; color: green;}
a.nav_links       { font-family: verdana; font-size: 10; color: green; text-decoration: none}
a.nav_links:hover { text-decoration: underline;} 		  
p                 { font-family: verdana; font-size: 10; color: green;}
span              { font-family: verdana; font-size: 10; color: green;}

and my html for main page is here...













JavaScript Beginner at work :)
 
because you need units.

Code:
td.font           { font-family: verdana; font-size: 10px; color: green;}
h5.tdhead         { font-family: verdana; color: green;}
a.nav_links       { font-family: verdana; font-size: 10px; color: green; text-decoration: none}
a.nav_links:hover { text-decoration: underline;}           
p                 { font-family: verdana; font-size: 10px; color: green;}
span              { font-family: verdana; font-size: 10px; color: green;}

*cLFlaVA
----------------------------
[tt]a frickin' twelve-gauge, what do you think?[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
[banghead]
 
cmon guys ..... :(

JavaScript Beginner at work :)
 
I can't see your examples. I am always redirected to the same annoying page that makes me use my profile. Nothing ever works and I get a lot of alerts. I hate those.
 
I'm using firefox w/o javascript... I can see the page, but nothing works yet. All the links are coded to use JS?
Rules of Thumb:
1.) Include doc type, and test in multipule browsers (as many as you have access to).

2.) Never use JS, JAVA, Flash or other technology for navigation or to hold content. If you do, users don't have the plugin or feature turned on can't use your site.

3.) "Frames are bad." Early on, there were a lot of sites that abused frames, by using far too many. This means that they got a reputation for being a "bad" feature to use (even though when used correctly you can make a fairly pretty site). The other pitfall with frames is that text only browsers (both from die hard lynx users and people surfing from moblie devices use), can't see both frames at a time, which means you'd need to provide them a frameless version or they won't be back (nothing for them to see). So, if you use frames, do so thoughtfully and sparingly. I know you didn't, but this post will be looked at later by other starting web designers and it's a good thing to remember.

4.) Don't use absolute positioning. If someone is has a bigger screen and higher resolution, let them use it. If someone has a smaller screen and lower resolution, then don't force them to scroll horizontally. Things like:
Code:
width="700" height="500"
should be replaced with percentages... unless you know that most your users are using the same depth/resolution as you.

[plug=shameless]
[/plug]
 
ok, i guess im stupid as i dont check in any other browsers other than Internet Explorer.

What i have done is ...

I ask the user to select a profile when they first visit my site, when u confirm profile, it saves a cookie remembering your chose profile. then when you visit the site again, it will check for your cookie with your profile name inside. If it finds it, the page will load and your name will appear in "Hello chosenPerson". If it cant find your profile name it will link back to the profile selection page...

why isnt this working in firefox?

are cookies disables? javascript disabled?

this is a bit of a bummer as it ruins quality parts of my site... programs i have written etc

using percentages to set my table width and height instead of using...

<td style="height:100px; width:100px">

is using percentages much better? meaning a lot of time in alterations ...

JavaScript Beginner at work :)
 
As an aside the phrase "choose your profile" is confusing and offputting.
I wondered what it meant and consequently just left it alone.
Perhaps reconsider the language used there.

As for not checking in anything other than IE.
Well, perhaps stupid is too strong a word but it is akin to buying a car and not checking if it can turn left. Sooner or later you will come across a left turn.

Foamcow Heavy Industries - Web design and ranting
Toccoa Games - Day of Defeat gaming community
Target Marketing Communications - Advertising, Direct Marketing and Public Relations
"I'm making time
 
Actually, backing up would be a better analogy than turning left. People turn left and right in about even proportions, but generally back up much less often than they go forward.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top