Inserting a layer into a cell

S

seven_percent

I want to insert a layer into a cell in a table and make the positon
relative to the coordinates of the cell; e.g. like when you insert a
layer into another layer, you can make the Left and Top position 0,
which corresponds to the coordinates of its parent layer.

How do I do this?
 
R

Ronx

In code view:

<td>
<div style="position: relative;">
Layer and other content goes here
</div>
</td>
 
S

seven_percent

In code view:

<td>
<div style="position: relative;">
Layer and other content goes here
</div>
</td>

--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp







- Show quoted text -

Thanks for the response. I had tried that by changing the property in
Positioning to Relative. However, then the layer is bound by the
cell. I just want it to be anchored to the top and left of the cell
but have the ability to expand beyond the boundaries of the cell.
Ultimately, this is going to be a fly-out menu that is triggered by a
mouse-over behavior for that cell; i.e. the user mouse-overs on the
cell, the layer appears. If they click something or mouse-out of the
layer, the layer reverts to hidden. Those bahaviors work. The
problem I am seeing is when the browser window is resized or a
different res is used, the layer doesn't line-up with the cell
properly.
 
R

Ronx

<table>
<tbody>
<tr>
<td>xxxxxxxx</td>
<td>xxxxxxxx</td>
<td>xxxxxxxx</td>
</tr>
<tr>
<td>xxxxxxxx</td>
<td>
<div style="position: relative;">
<div id="layer1" style="position: absolute; top: 0; left:
0;z-index:1;background:yellow">
<p style="white-space:nowrap">Layer contents<br />and
stuff</p>
</div>
</div>
</td>
<td>xxxxxxxx</td>
</tr>
<tr>
<td>xxxxxxxx</td>
<td>xxxxxxxx</td>
<td>xxxxxxxx</td>
</tr>
</tbody>
</table>

The layer is anchored to the top left of the relatively positioned div,
which in turn is anchored to the top left of the table's centre cell.

There are no constraints on the size of the layer. The table cell may
move around as the browser is resized, and font sizes changed, but the
top left of the layer is firmly attached to the top left of the cell.
The paragraph's whitespace style is to force the layer to be wider than
the cell.
--
Ron Symonds - Microsoft MVP (FrontPage)
Reply only to group - emails will be deleted unread.

http://www.rxs-enterprises.org/fp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top