Skip to content

Commit 200eca7

Browse files
authored
Update get browser screen size - ViewPort (notes).txt
1 parent 9d1078c commit 200eca7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

get browser screen size - ViewPort (notes).txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ The majority of problem cases we’ve seen are from developers that wanted to be
1212
before their <html> tag. When in doubt, use the simple and short <!doctype html>.
1313
_____________________________________________________________________
1414

15+
It seems that there is no way to get browser viewport size in "quirks mode"!
16+
17+
so, the best way to go seems to be by using <!doctype html> declaration and use
18+
jquery $(window).width()/$(window).height() or javascript document.documentElement.clientWidth/document.documentElement.clientHeight
19+
20+
_____________________________________________________________________
21+
1522
Tested all the doctypes declarations below and through all of them it's possible to get the correct browser viewport size:
1623

1724
Common DOCTYPE Declarations (html 5 "<!DOCTYPE html>" seems to be the recommended one):

0 commit comments

Comments
 (0)