|
|
|
|
Thread title: Browser Size |
|
|
|
|
|
Thread tools
Search this thread
Display Modes
|
|
03-31-2010, 02:54 PM
|
#1
|
Status: I'm new around here
Join date: Mar 2010
Location: United States
Expertise: Working on becoming an expert
Software: Firefox, Visual Studio
Posts: 21
|
Browser Size
Is there a way to determine the client's browser size via Javascript? In another thread we were discussing screen resolution sizes, but I don't think that is important because someone could have a large screen resolution but their web browser could be only a percentage of that resolution or they could surf the web with two browsers open at once.
|
|
04-03-2010, 12:22 AM
|
#2
|
Status: Junior Member
Join date: Nov 2009
Location: Kiev, Ukraine
Expertise:
Software:
Posts: 27
|
window.innerHeight/Width
Provided by most browsers, but importantly, not Internet Explorer.
document.body.clientHeight/Width
Provided by many browsers, including Internet Explorer.
document.documentElement.clientHeight/Width
Provided by most DOM browsers, including Internet Explorer.
..
more on topic - here:
http://www.howtocreate.co.uk/tutoria.../browserwindow
|
|
04-03-2010, 01:15 AM
|
#3
|
Status: Request a custom title
Join date: Apr 2007
Location: UK
Expertise: Code & Programming
Software: Coda, TextMate, Sublime 2
Posts: 2,097
|
$(window).width();
$(window).height();
Using jQuery you can use these^.
Or use the methods c69 described.
|
|
07-21-2010, 05:58 AM
|
#4
|
Status: I'm new around here
Join date: Jul 2010
Location: california,US
Expertise: SEO,SEM,web design,web develop
Software: firefox
Posts: 20
|
To determine the size of browser we can use javascript properties.
document.body.offsetWidth,
document.body.offsetHeight
These properties will return browser width and browser height.
|
|
07-23-2010, 06:14 AM
|
#5
|
Status: I'm new around here
Join date: Jul 2010
Location: PA,USA
Expertise: web design,development,seo,sem
Software: i.e,firefox,google chrome
Posts: 20
|
In order to find out client browser width and height, we can use following javascript .
<script language="text/javascript">
var browserwidth;
var browserheight;
browserwidth = document.documentElement.clientWidth ,
browserheight = document.documentElement.clientHeight
</script>
|
|
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|