Solved

Show web browser size when changeing size of browser

Posted on 2013-11-19
5
360 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTML5 storage and web apps 11 53
IE11 cannot send an email using a gmail account 2 31
Add a little space on either side of a table. 12 25
title attribute 5 27
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article discusses four methods for overlaying images in a container on a web page
This Micro Tutorial will demonstrate how to updated your Facebook updates after changing anything in the title or description of a shared article.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

730 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