|
Posted by Gιrard Talbot on 05/05/06 09:44
subp@wachtel.us wrote :
> Hi there,
> I've searched and can't find a solution.
>
> I have a relatively positioned td
The latest CSS 2.1 Working draft (in fact, all CSS 2.x technical
recommendation releases) strongly discourage the use of position on
table cells:
"The effect of 'position:relative' on (...) table-cell (...) elements is
undefined."
http://www.w3.org/TR/CSS21/visuren.html#propdef-position
"Note. Positioning and floating of table cells can cause them not to be
table cells anymore, according to the rules in section 9.7"
http://www.w3.org/TR/CSS21/tables.html#q7
and absolutely positioned DIVs within
> it.
Why make complex when you can do simple?
> In IE, it works, but in FF it doesn't.
Chances are: in IE, it's a layout bug but in FF it renders exactly what
your code demanded.
> Here's my example code:
How about an url instead?
> HTML file:
> <html><head><title>test</title><link rel="stylesheet" type="text/css"
> href="test_css_positioning.css" />
Is this XHTML or HTML? You use no doctype declaration.
</head>
> <body>
> <h1>Test of Absolute Positioning in Table Data</h1>
> All of the divs should show up in their proper places inside of the td.
> <table>
> <tr>
> <td id="container">center
> <div id="topleft">topleft</div>
> <div id="topright">topright</div>
> <div id="bottomleft">bottomleft</div>
> <div id="bottomright">bottomright</div>
> </td>
> </tr>
> </table>
> </body>
> </html>
>
> CSS file:
> td#container {
> position: relative;
> width: 500px;
> border: 1px #000000 solid;
> height: 70px;
> text-align: center;
> vertical-align: middle;}
>
> #topleft {
> position: absolute;
> top: 0px;
> left: 0px;
> }
So far, we can establish for sure that the whole table, table rows and
table cells were not needed at all if you wanted to position something.
If the table (and table row, table cells) were needed, then using css
properties responsible for horizontal alignment was ok.
GΓ©rard
--
remove blah to email me
Navigation:
[Reply to this message]
|