473,670 Members | 2,307 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Width & Height of browser viewport.

HI fellows, How can I get visible viewport dimensions of any browser ?

Aug 24 '06 #1
2 6217

co************@ gmail.com wrote:
HI fellows, How can I get visible viewport dimensions of any browser ?
IE, Opera - document.body.o ffsetWidth & document.body.o ffsetHeight

Opera, Firefox, Netscape- window.innerWid th & window.innerHei ght

Note that if you use document.body.o ffsetWidth & height, the body tag
may need to be parsed first. Also note that in Firefox and Netscape the
size returned by document.body.o ffsetWidth & Height is that of the
document, not the window (which would make sense, but IE doesn't see it
that way)...

Aug 24 '06 #2
rf
co************@ gmail.com wrote
HI fellows, How can I get visible viewport dimensions of any browser ?
Looks like those FAQ entries posted every day are working :-). Wasn't it
just two days ago that this exact FAQ was posted? And commented upon
heavily.

Cheers
Richard.
Aug 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

157
16370
by: Dennis | last post by:
Is there some way --using, say, DOM or javascript-- to detect the current pixel width and/or height of a relatively sized table or of one of its columns or rows. I'm going to be writing javascript to adjust my page to the viewer's browser window dimensions and this would sure be great information to have. Thanks .... Dennis
11
7850
by: Not4u | last post by:
Hello, I have a problem with CSS code. I want to have one menu column with a fixed width and a 100% height and the rest of the page for content. ---------------- |.|.|<--100%-->| |.M.|----------| |.E.|----------| |.N.|----------| |.U.|----------|
7
6836
by: DM | last post by:
For <img> tags, are the width and height attributes necessary? Could they just be omitted? dm
8
2493
by: Harris Kosmidis | last post by:
It seems I cannot understand CSS, well. I have donw the following page: http://www.pennias.gr/home.php It's in greek but the context is of no importance. I used a big table to put in my page beacuse I couldn't find another way to make horizontal div that will be with margin- =0 and look well both in IE and FF.
3
7320
by: Q. John Chen | last post by:
I have a page contains a table (e.g a 3-row table). The middle row is for the content and the bottom row is for footer notes. When the middle row does not have much info, the footer goes way too high up. How can I automatically adjust the height of the middle row when a user re-size the browser window. Or, how can specify a minimum height so at least the footer is a footer?
6
7802
by: Tweety | last post by:
Hello, I need to display the current Web Browser's Width on my web page. I Tried Screen.width, but it is for the width of the Windows. I tried Window.width, but it doesn't work. What i want to do is, if the user resize the Web Browser's Window, upon refresh, the webpage will show the width size of the web browser windows. this will help me in working on Floating Menu on my web page. thanks.
8
2482
by: Martin Honnen | last post by:
VK wrote: Mozilla has document.height document.width IE has scrollHeight/scrollWidth, depending on compatMode you will need these properties of document.documentElement or document.body --
6
8164
by: msoliver | last post by:
I'm trying to figure out why the following creates a vertical scroll bar. Browser is IE 7 - using XHTML 1.0. I expand html and body to height of 100% and then I want to put a border around the whole viewport. What happens is that I get a vertical scrollbar (which I can hide, of course). Essentially what I'd like to know why adding a border increases the block but not the 100% sized viewport (and thus the scrollbar).
0
8469
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8903
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8814
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8592
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8661
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7419
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5684
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.