473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

availHeight/Width in Opera

I've noticed that screen.availHeight/availWidth don't return
correct results in Opera 8, meaning that what Opera returns are
the pure screen dimensions, no the actual dimensions due to
taskbars or similar. On the other hand other browsers (MSIE,
Netscape, Mozilla) get this correct.
Anybody knows of a workaround?

Thanks.

Jul 23 '05 #1
6 1585
Severus Snape wrote:
I've noticed that screen.availHeight/availWidth don't
return correct results in Opera 8, meaning that what
Opera returns are the pure screen dimensions, no the
actual dimensions due to taskbars or similar.
That would represent a regression as Opera 7.23 certainly did return
availHeight/Width dimensions that took the taskbar into account, but
earlier versions did not. Not that it matters much as screen dimensions
have little to do with anything, and never could be expected to be an
accurate source of information (particularly on multi-monitor
configurations).
On the other hand other browsers (MSIE, Netscape, Mozilla)
get this correct.
When you are dealing with aspects of a browser DOM that is not covered
by public specifications there is no criteria for 'correct'. Browsers
have always differed in their interpretation of screen dimensions, and
they still do.
Anybody knows of a workaround?


Design out all need to be interested in the screen dimensions.

Richard.
Jul 23 '05 #2
Severus Snape <sv*****@yahoo.com> writes:
I've noticed that screen.availHeight/availWidth don't return
correct results in Opera 8, meaning that what Opera returns are
the pure screen dimensions, no the actual dimensions due to
taskbars or similar.


In my Opera 8, build 7561, screen.availHeight gives me 1170, which is
correct (and the same value that IE gives). What exact build are you
using and what code are you using to find screen.availHeight? And are
you running in MDI or SDI mode? Do you have any user.js code installed?

(and what do you need the screen size for anyway? :)

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #3
DU
Severus Snape wrote:
I've noticed that screen.availHeight/availWidth don't return
correct results in Opera 8, meaning that what Opera returns are
the pure screen dimensions, no the actual dimensions due to
taskbars or similar.

screen.availHeight/availWidth are not updated in real time in Opera 8.
Besides that issue, Opera 8 reports accordingly
screen.availHeight/availWidth property values. Opera 8.01 build 7624 here.

DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Firefox 1.0.4 :)
Jul 23 '05 #4
DU
Richard Cornford wrote:
Severus Snape wrote:
I've noticed that screen.availHeight/availWidth don't
return correct results in Opera 8, meaning that what
Opera returns are the pure screen dimensions, no the
actual dimensions due to taskbars or similar.

That would represent a regression as Opera 7.23 certainly did return
availHeight/Width dimensions that took the taskbar into account, but
earlier versions did not. Not that it matters much as screen dimensions
have little to do with anything, and never could be expected to be an
accurate source of information (particularly on multi-monitor
configurations).

On the other hand other browsers (MSIE, Netscape, Mozilla)
get this correct.

When you are dealing with aspects of a browser DOM that is not covered
by public specifications there is no criteria for 'correct'. Browsers
have always differed in their interpretation of screen dimensions, and
they still do.


Generally speaking, I'd say they agree rather than they differ. In a
majority of cases, they do agree; in a minority of cases, they differ.
Anybody knows of a workaround?

Design out all need to be interested in the screen dimensions.

Richard.


I think this sort of response should be underlined, repeated and
explained more often. screen properties (and window related-measurements
properties) are pretty much useless. Designing with screen (and window
related-measurements) properties goes against flexible, scalable webpage
design, goes against interoperability on different media and web-aware
devices.

DU
--
The site said to use Internet Explorer 5 or better... so I switched to
Firefox 1.0.4 :)
Jul 23 '05 #5
Lasse Reichstein Nielsen wrote:
In my Opera 8, build 7561, screen.availHeight gives me 1170, which is
correct (and the same value that IE gives). What exact build are you
using and what code are you using to find screen.availHeight? And are
you running in MDI or SDI mode? Do you have any user.js code installed?
I must partially rectify what I said.
The incorrect behaviour occured with Opera 8.0 build 1095 under FreeBSD.
I then tried with Opera 8.0 build 7561 under Windows and it worked all
right.
Perhaps it's just something about freebsd, even though the other browser
I tried worked ok (mozilla, konqueror).

(and what do you need the screen size for anyway? :)

/L


Well, to tell the truth I'm trying to build a minimal javascript
object-oriented, agent-indipendent library for most common browser
oparations. The screen size comes into play when I want to open a
window to maximum dimension. As you know, only MSIE supports the
fullscreen attribute, so if you want to do the same under`other browsers
you have to manually set the dimensions to the screen size.

Bye.

Jul 23 '05 #6
Severus Snape <sv*****@yahoo.com> writes:
The screen size comes into play when I want to open a window to
maximum dimension.
Even with the screen dimension known, Opera in MDI mode will not allow
a full screen window (well, the window is there, you just can't see
any more of it than the size of the Opera main application window :).
As you know, only MSIE supports the fullscreen attribute, so if you
want to do the same under`other browsers you have to manually set
the dimensions to the screen size.


Seems that's one of the functionalities that won't work on all
browsers (and I'm quite happy my Opera won't allow it ... bloody
pages better stay where I say they can go, or its closing time :).

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #7

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

Similar topics

14
by: delerious | last post by:
I need to determine an element's width and height in pixels (not including padding, border, and margin) in Javascript. The element will not have width or height styles specified. In Mozilla, I...
8
by: delerious | last post by:
I am noticing that Mozilla does not include an element's padding when calculating its width. IE and Opera do. Who is correct?
1
by: The Master | last post by:
I ask this because I have a bread Crumb navigation on this new design layout: http://www.goldhilmedia.com/showbug/finished.html (the section I'm referring to is Main Category --> Sub Category...
12
by: The Master | last post by:
>>does a floated element require a fixed width to work? >It does if the UA adheres to CSS 2.0 rules, not if it adheres to CSS 2.1 >float rules (or if it's IE). So does that mean nn6, moz1.0,...
14
by: Philip Herlihy | last post by:
I've been trying to create a simple vertical navigation bar, using (as recommended) an unordered list (UL) of hyperlinks. I'd like to have a hover effect, so I have to style the links themselves....
6
by: Joe Morrison | last post by:
By my reading of the HTML standard: http://www.w3.org/TR/REC-html40/struct/tables.html the HTML shown below should display the text "Enter password" with the input field immediately adjacent,...
11
by: Norman L. DeForest | last post by:
Am I misunderstanding the CSS specifications or is Firefox (version 1.0.6) (and Opera) doing the wrong thing? It appears that Firefox 1.0.6 includes the border in width calculations for tables...
10
by: ima | last post by:
I'm attempting to use CSS for a three column layout. My problem is that although I'm using width % ie. column1 width 20%, column2 width 60%, and column3 20% I end up with a horizontal scroll bar...
1
by: Veerle | last post by:
Hi, I have 2 div blocks with each div taking up half of the page width. So in the CSS they both have width: 50%. See http://home.scarlet.be/~vv991306/leftright.html In Mozilla Firefox and...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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...
0
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...
0
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,...

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.