HTML Precise positioning: Scrollleft,scrollwidth,clientwidth,offsetwidth
ScrollHeight: Gets the scroll height of the object.
ScrollLeft: Sets or gets the distance between the left edge of the object and the leftmost of the currently visible content in the window
ScrollTop: Sets or gets the distance between the top of the object and the top of the visible content in the window
ScrollWidth: Gets the scrolling width of the object
Offsetheight: Gets the height of the object relative to the layout or parent coordinates specified by the parent coordinate OffsetParent property
Offsetleft: Gets the calculated left position of the object relative to the layout or the parent coordinate specified by the OffsetParent property
OffsetTop: Gets the computed top position of the object relative to the layout or the parent coordinate specified by the OffsetTop property
Event.clientx horizontal coordinates of relative documents
Event.clienty vertical coordinates of relative documents
Event.offsetx horizontal coordinates relative to the container
Event.offsety the vertical coordinate of the relative container
Document.documentElement.scrollTop The vertical scrolling value
Event.clientx+document.documentelement.scrolltop horizontal coordinates of relative documents + amount of vertical scrolling
screen.availwidth--the available screen widths
screen.availheight--the available screen height
$ (window). width (); (Does not contain scroll bar width)
Window.innerwidth; (including the right scroll bar width)
Three ways to get the width and height of the browser window (the viewport of the browser, excluding toolbars and scroll bars):
(IE, Chrome, Firefox, Opera and Safari)
Window.innerheight; The internal height of the browser window
Window.innerwidth; The internal width of the browser window
IE 5, 6, 7, 8:
Document.documentElement.clientHeight;
Document.doeumentElement.clientWidth;
Or:
Document.body.clientHeight;
Document.body.clientWidth
The following will cover so the browser:
var W=window.innerwidth | | Document.documentElement.clientWidth | | Document.body.clientWidth;
var H=window.innerheight | | Document.documentElement.clientHeight | | Document.body.clientHeight;
Get screen width