Re: Help with Position attribute
Falc2199 wrote:
[color=blue]
> Hi all,
> I am using the "Poistion" attribute to correctly align a column
> of images that I have on a table. The code looks like so....
>
> <TD valign="top" class="listinglight" align="left">
>
> <A href="somewhere.html" style="position: absolute; left: 25px;">
> <IMG src="CopyButton.gif" border="0" /></A>
>
> <A href="anywhere.html" style="position: absolute; left: 45px;">
> <IMG src="SaveButton.gif" border="0" /></A>
>
> </TD>
>
> One problem is that when the window is shrunk to half size the browser
> does not move the images to compensate for this and they spill over
> into the next cell of the table (horizontally spill over).[/color]
That's because you use position:absolute. This takes the
element out of the normal flow, so the td will react as if
there is nothing in it, as you just 'took it out' by
defining position:absolute. Use position:relative instead.
But aligning within table cells should be far easier than
using position:relative. If you want them horizontally
centered, use style="text-align:center".
[color=blue]
> Another problem is that if one row is smaller than another, the images
> do not fit into that row. They spill down vertically into the row
> below.[/color]
Same reason :-)
--
Els
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo - |