Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 20th, 2005, 06:49 PM
Falc2199
Guest
 
Posts: n/a
Default 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
  #2  
Old July 20th, 2005, 06:49 PM
Els
Guest
 
Posts: n/a
Default 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 -

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles