PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.html > DIVs inside table cells?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
DIVs inside table cells?

Réponse
 
LinkBack Outils de la discussion
Vieux 13/04/2008, 14h46   #1
Test
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut DIVs inside table cells?

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.
  Réponse avec citation
Vieux 13/04/2008, 15h50   #2
Harlan Messinger
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: DIVs inside table cells?

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.
  Réponse avec citation
Vieux 14/04/2008, 00h27   #3
rf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: DIVs inside table cells?

Harlan Messinger <hmessinger.removethis@comcast.net> wrote in
news:66ektnF2jvlqiU1@mid.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
  Réponse avec citation
Vieux 14/04/2008, 02h08   #4
Harlan Messinger
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: DIVs inside table cells?

rf wrote:
> Harlan Messinger <hmessinger.removethis@comcast.net> wrote in
> news:66ektnF2jvlqiU1@mid.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.
  Réponse avec citation
Vieux 14/04/2008, 08h19   #5
Ben C
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: DIVs inside table cells?

On 2008-04-14, Harlan Messinger <hmessinger.removethis@comcast.net> wrote:
> rf wrote:
>> Harlan Messinger <hmessinger.removethis@comcast.net> wrote in
>> news:66ektnF2jvlqiU1@mid.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.


rf is right and I almost mentioned that, but I really do think this is a
bit of a loophole. If it was intentional they would have said something
about it in the section on containing block.

All they mean IMO is that it's undefined when you start setting top,
left etc. on relatively positioned table cells.

After all everything else can be a containing block for positioned
descendents, even inline boxes (and that's much madder than
table-cells).
  Réponse avec citation
Vieux 10/06/2008, 20h53   #6
AC7PN
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: DIVs inside table cells?

On Apr 13, 4:27 pm, rf <r...@x.invalid> wrote:
> Harlan Messinger <hmessinger.removet...@comcast.net> wrote innews:66ektnF2jvlqiU1@mid.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


Safari, IE, and Opera all locate a "position:absolute referenced
<div>" (located inside a table-cell that is "position:relative")
relative to the cell location.

Only Firefox requires the addition of another position:relative <div>
inside the cell to get the location correct. I view this with contempt.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 12h21.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,15928 seconds with 14 queries