473,508 Members | 2,247 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A question about the exact position of positioned boxes

Hi,

even if I have read more and more about the argoment (also in the W3C
site), I still can't exactly position my boxes on the pages.

I would to know what is the EXACT displacement between an outer box
and an inner box (placed with the "position:absolute" property and the
"top" and "left" values).

Trust me: the W3C site doesn't explain this in details. It just gives
some raccomandations and general information about positioning.

By the way, Opera and IE seem to operate in different modes...

Can you help me?

Thanks. Luigi.
Jul 21 '05 #1
4 1786
Luigi wrote:
I would to know what is the EXACT displacement between an outer box
and an inner box (placed with the "position:absolute" property and the
"top" and "left" values).


Assuming only the outer box is positioned, then normal flow applies, so its
whatever the margins and padding work out to.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #2
David Dorward <do*****@yahoo.com> wrote in message news:<cv*******************@news.demon.co.uk>...
Luigi wrote:
I would to know what is the EXACT displacement between an outer box
and an inner box (placed with the "position:absolute" property and the
"top" and "left" values).


Assuming only the outer box is positioned, then normal flow applies, so its
whatever the margins and padding work out to.

Ok David, assuming the outer box has a relative position, where can I
find the upper-left corner of the inner box?

And what are the differences between IE and other browsers?

Thanks, Luigi.
Jul 21 '05 #3
Luigi wrote:
Ok David, assuming the outer box has a relative position, where can I
find the upper-left corner of the inner box?


Then, assuming normal flow (as before) - AFAIK it is exactly the same as if
the outer box was staticly positioned.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #4
Luigi wrote:
David Dorward <do*****@yahoo.com> wrote in message news:<cv*******************@news.demon.co.uk>...
Luigi wrote:

I would to know what is the EXACT displacement between an outer box
and an inner box (placed with the "position:absolute" property and the
"top" and "left" values).


Assuming only the outer box is positioned, then normal flow applies, so its
whatever the margins and padding work out to.


Ok David, assuming the outer box has a relative position, where can I
find the upper-left corner of the inner box?

And what are the differences between IE and other browsers?

Thanks, Luigi.


Perhaps a basic condensed review of the box model to be found in the
specs is what you are looking for. All browsers respect the following:

There are four (4) different boxes:
Static
Relative
Absolute
Fixed

A 'Static' box does not take positioning relative to where it is in the
normal flow - it remains static in its normal flow.

A 'Relative' box is positioned relative to where it is in the normal
flow - Positioning is offset from the position it would have taken in
Static. (Taken out of normal flow, but real estate is maintained where
it would have normally been in normal flow.)

An 'absolute' box is positioned relative to the viewport (0,0 or
top/left of the screen), but if located within a containing block (i.e.
a relative box), it is positioned relative to the containing block
(essentially, the viewport for the abs box will then be the rel box)
therefore the top/left of the abs box will be the top/left of the rel
box. (Always out of flow.)

A 'fixed' box is always positioned relative to the top/left of the
viewport. (Always out of flow.)

--
Gus
Jul 21 '05 #5

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

Similar topics

4
10984
by: Ken Kast | last post by:
Here's my situation. I have a statically positioned table that has an image in a cell. I also have some layers, defined by absolute-positioned DIVs for some animation. Everything works until I...
14
21888
by: Zenobia | last post by:
Hello folks, Is it possible to position an item within a <td> element? For instance see below. The table has multiple rows, one for each database record. Each row has 3 hrefs associated with it...
0
1517
by: Luigi | last post by:
I would know what "criteria" is used in box positioning with the position property. Here my tries (using IE and Opera): I have a box with an absolute positioning (properties used: position,...
10
18034
by: Danny | last post by:
How can I get the coordinates of the mouse cursor in Mozilla browsers as well as Opera and IE6? I'm struggling to understand how to capture mouse movement events with Mozilla/Netscape/Firefox and...
4
6341
by: spivee | last post by:
I'm having an odd type of issue. I want to be able to pass an element name in my javascript event and find the location of the element, be it a div, span, img whatever, specifically the top and...
6
6063
by: Gérard Talbot | last post by:
Hello fellow stylers, When trying this page http://www.gtalbot.org/BrowserBugsSection/PercentualRelativePositioning.html I get different rendered layouts with IE 6, IE 7 beta 2, Firefox...
5
1429
by: Sylvain Chevillard | last post by:
Hello. I observed something strange in Firefox which let me study precisely the section 10.3.7 of the specifications of CSS2 and I have a question about it. The specifications refer to a...
3
55912
by: Andrew Hall | last post by:
Hi all Can anyone advise how to get the position of an open form and how to set the position of an opening form within the access window. I have: MA Access97 (because I do not have the funds...
10
3242
by: Mark | last post by:
According to my book on CSS, if you apply 'position: relative' to a block-level element, it will stay exactly where it is. However, you can then use top, left etc. to offset the element relative to...
0
7229
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
7333
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,...
0
7398
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...
1
5057
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4716
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...
0
3208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1566
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
428
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.