1 reply [Last post]
dante2010xxx
Offline
newbie
Last seen: 16 years 3 weeks ago
Joined: 2004-07-12
Posts: 1
Points: 0

Hi,

I have the following code:

<table cellspacing="0" cellpadding="2" border="0"> 
 <tr> 
      <td valign="top"> 
                                 
 <span style="position: relative; top: 80px; left: 10px;"><img src="images/sold.gif" alt="" border="0"></span> 
 <img src="upload/mainimage.jpg>" alt="" border="0"> 
</td> 
</tr></table> 

The span and sold.gif image are pushing the main image down in the table, so there's a big piece of whitespace above it. Not sure what I'm doing wrong here.. is there some special trick I should know about using relative positioning?
[/code]

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 5 years 30 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Relative positioning question

Hi dante2010xxx ,

You've got a top position declared on that relative box, is it needed?

as on a relative box moving it will preserve its original space whilst dropping down.
Hugo.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me