![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is it possibel to have DIV's inside a table cell so that their position can be given relative to top left corner of the cell. |
|
Now the DIVs seem to position themselves relative to previous object. |
#3
| |||
| |||
|
|
Test wrote: Is it possibel to have DIV's inside a table cell so that their position can be given relative to top left corner of the cell. Yes. Now the DIVs seem to position themselves relative to previous object. Without seeing your page it isn't possible for anyone to know what you should expect to see or what you need to do to change it. If the position of the cell is specified "relative" then a DIV inside it with position: absolute should be positioned relative to the cell's origin, and IE 7 does this, but on the other hand if the cell is styled with a border, the border disappears. Firefox, in contrast, positions the DIV relative to the viewport origin (assuming there are no containing blocks between the viewport and the cell; I didn't test any other case). If you nest the DIV inside another, relative positioned DIV, inside the cell, which now doesn't have to be relative positioned, then the positioning works in Firefox. So I think Firefox has a bug in this respect. |
#4
| |||
| |||
|
|
Harlan Messinger <hmessinger.removethis (AT) comcast (DOT) net> wrote in news:66ektnF2jvlqiU1 (AT) mid (DOT) individual.net: Test wrote: Is it possibel to have DIV's inside a table cell so that their position can be given relative to top left corner of the cell. Yes. Now the DIVs seem to position themselves relative to previous object. Without seeing your page it isn't possible for anyone to know what you should expect to see or what you need to do to change it. If the position of the cell is specified "relative" then a DIV inside it with position: absolute should be positioned relative to the cell's origin, and IE 7 does this, but on the other hand if the cell is styled with a border, the border disappears. Firefox, in contrast, positions the DIV relative to the viewport origin (assuming there are no containing blocks between the viewport and the cell; I didn't test any other case). If you nest the DIV inside another, relative positioned DIV, inside the cell, which now doesn't have to be relative positioned, then the positioning works in Firefox. So I think Firefox has a bug in this respect. http://www.w3.org/TR/CSS21/visuren.h...opdef-position "The effect of 'position: relative on ... table-cell ... is undefined." All browsers are behaving correctly. If the effect is undefined they are free to do whatever they want. |
#5
| |||
| |||
|
|
rf wrote: Harlan Messinger <hmessinger.removethis (AT) comcast (DOT) net> wrote in news:66ektnF2jvlqiU1 (AT) mid (DOT) individual.net: Test wrote: Is it possibel to have DIV's inside a table cell so that their position can be given relative to top left corner of the cell. Yes. Now the DIVs seem to position themselves relative to previous object. Without seeing your page it isn't possible for anyone to know what you should expect to see or what you need to do to change it. If the position of the cell is specified "relative" then a DIV inside it with position: absolute should be positioned relative to the cell's origin, and IE 7 does this, but on the other hand if the cell is styled with a border, the border disappears. Firefox, in contrast, positions the DIV relative to the viewport origin (assuming there are no containing blocks between the viewport and the cell; I didn't test any other case). If you nest the DIV inside another, relative positioned DIV, inside the cell, which now doesn't have to be relative positioned, then the positioning works in Firefox. So I think Firefox has a bug in this respect. http://www.w3.org/TR/CSS21/visuren.h...opdef-position "The effect of 'position: relative on ... table-cell ... is undefined." All browsers are behaving correctly. If the effect is undefined they are free to do whatever they want. Ah, OK, thanks. I was concentrating on the section on absolute positioning and didn't bother to read the section on relative positioning. |
#6
| |||
| |||
|
|
Harlan Messinger <hmessinger.removet... (AT) comcast (DOT) net> wrote innews:66ektnF2jvlqiU1 (AT) mid (DOT) individual.net: Test wrote: Is it possibel to have DIV's inside a table cell so that their position can be given relative to top left corner of the cell. Yes. Now the DIVs seem to position themselves relative to previous object. Without seeing your page it isn't possible for anyone to know what you should expect to see or what you need to do to change it. If the position of the cell is specified "relative" then a DIV inside it with position: absolute should be positioned relative to the cell's origin, and IE 7 does this, but on the other hand if the cell is styled with a border, the border disappears. Firefox, in contrast, positions the DIV relative to the viewport origin (assuming there are no containing blocks between the viewport and the cell; I didn't test any other case). If you nest the DIV inside another, relative positioned DIV, inside the cell, which now doesn't have to be relative positioned, then the positioning works in Firefox. So I think Firefox has a bug in this respect. http://www.w3.org/TR/CSS21/visuren.h...opdef-position "The effect of 'position: relative on ... table-cell ... is undefined." All browsers are behaving correctly. If the effect is undefined they are free to do whatever they want. -- Richard Killing all threads involving google groups The Usenet Improvement Project:http://improve-usenet.org |
![]() |
| Thread Tools | |
| Display Modes | |
| |