468,467 Members | 2,678 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,467 developers. It's quick & easy.

Help with Position attribute

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).

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.

Any help would be appreciated,
Jehan
Jul 20 '05 #1
1 12418
Els
Falc2199 wrote:
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).
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".
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.


Same reason :-)
--
Els

Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Philip | last post: by
7 posts views Thread by mike | last post: by
1 post views Thread by sommarlov | last post: by
3 posts views Thread by lawrencec | last post: by
4 posts views Thread by orfiyus | last post: by
8 posts views Thread by manugm1987 | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.