-
DOCTYPE question
Yes I have a website which the link is http://hiscross.coffeecup.com/ . My website works great in all the browsers such as Opera , Firefox , Internet Explorer , CHrome , but in Safarai it falls apart just a little bit , and I found out that using doctype (<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">) , somehow makes it fall aprt , but if I delete doctype it works in all browsers , but falls apart in my html editor , and I mean totally falls apart , how can I use doctype , and it not fall apart in Safari ?
Here is an example of it without doctype : http://hiscross.coffeecup.com/index14.html
-
What exactly is the problem with Safari? There doesn't seem to be a problem with your site on my machine.
-
it looks fine in Safari for me too
edit: there are lots of HTML errors. Go check your code at http://validator.w3.org/
-
Oh that is funny for my main index.html page is off on my machine , but my index14.html works fine , check my index.html page to see how it works
-
hmm,I looked at both and they both work fine on my safari/machine/browser
not sure what you are talking about either
-
whats the size of your screen?
-
3 Attachment(s)
Well here are screenshots of how my website looks on Safari , and I use windows 8.1 , and the size of my screen is 1920x1080.
Here is my website with doctype , in Safari.
Attachment 5296
And here is my website in Safari without a doctype , which works well.
Attachment 5297
Now here is my website in my html editor , without doctype.
Attachment 5298
Do I need a doctype argument , or can I do witohout , and if so , how can I get to work in my html editor ?
Could the problem somehow be with windows 8.1 ?
-
Actually I solved my own problem through adding this code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
-
-
Generally you should start with a standards invoking DOCTYPE, like:
HTML Code:
<!DOCTYPE html>
as the first thing in the source code of the page(s). Test the page(s) in a current version modern browser like IE 10 or Chrome 31.
But because other approaches are workable, and depending upon the exact design things can vary, there is no hard and fast rule.