Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Layer Re-size problem

Status
Not open for further replies.

dougiepaine

Technical User
Aug 13, 2003
2
GB
Hi

I’m working on a page that doesn’t contain any frames because I’m trying to avoid using frames. I have a table with a layer placed over the top containing text that scrolls with the overflow: auto attribute. This works fine until you resize your browser because page centres its self when the browser is resized, the table moves but the layer doesn’t so the scroll bar and text becomes out of line. Is there any way I can get the layer to move with the table?

Layer code….

<DIV id=&quot;Layer1&quot; style=&quot;position:absolute; left:401px; right:50px; top:50px; width:497px; height:401px; z-index:1; overflow: auto;&quot;>
 
Why not place the text in a td rather than a div

MrBelfry
 
Thanks for your reply

The table is a specific size and i don’t want to change the size of it because it will look out of place compared to the other pages on the site. There is too much text to fit in the table so this is why i needed to use the layer with the scroll bar and the overflow: auto; attribute.

Here is a link to the page I am talking about, notice when you minimise the browser slightly the layer becomes out of line.


Cheers
 
Try replacing this section:

Code:
<TD width=&quot;492&quot; valign=&quot;top&quot;><TABLE width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
          <!--DWLayoutTable-->
          <TR> 
            <TD width=&quot;492&quot; height=&quot;400&quot;> </TD>
          </TR>
        </TABLE></TD>

with

Code:
<td style=&quot;overflow: scroll>
Put you content here. No need to wrap it in a div!. You might need to play with the width & height a little bit to make it just right.
</td>

MrBelfry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top