By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,493 Members | 1,920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,493 IT Pros & Developers. It's quick & easy.

Help with Position attribute

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.