Solved

Show web browser size when changeing size of browser

Posted on 2013-11-19
5
359 Views
Last Modified: 2013-11-25
I wonder if there is any plugin or so that automatically displays the size of the browser when changing I change it's size?
0
Comment
Question by:mdoland
5 Comments
 

Expert Comment

by:Raymond Doran
ID: 39659352
What are you trying to accomplish?
0
 
LVL 15

Assisted Solution

by:unknown_routine
unknown_routine earned 167 total points
ID: 39659363
Just copy/ paste this code to your HTML(paste
it to wherever you want size of browser be printed)


<script type="text/javascript">
var winW = 630, winH = 460;
if (document.body && document.body.offsetWidth) {
 winW = document.body.offsetWidth;
 winH = document.body.offsetHeight;
}
if (document.compatMode=='CSS1Compat' &&
    document.documentElement &&
    document.documentElement.offsetWidth ) {
 winW = document.documentElement.offsetWidth;
 winH = document.documentElement.offsetHeight;
}
if (window.innerWidth && window.innerHeight) {
 winW = window.innerWidth;
 winH = window.innerHeight;
}

document.writeln('Window width = '+winW);
document.writeln('Window height = '+winH);
</script>

Open in new window

0
 
LVL 15

Expert Comment

by:unknown_routine
ID: 39659401
If you want to just see the size in the Statusbar of the browser, change
document.writeln('Window width = '+winW);
document.writeln('Window height = '+winH);

to

window.status='Window width = '+winW+ '   '+'Window height = '+winH
0
 
LVL 30

Assisted Solution

by:Alexandre Simões
Alexandre Simões earned 166 total points
ID: 39659413
0
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 167 total points
ID: 39659417
In Chrome, if you switch to the console view, as you size the browse, the width and height appear in real time in the upper right corner.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
This Micro Tutorial will demonstrate how to updated your Facebook updates after changing anything in the title or description of a shared article.
This Micro Tutorial will demonstrate using MozBar to view an article that was deleted from the Search Engine Watch site after being debunked by Google.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question