Jump to content


Photo

div tags


  • Please log in to reply
3 replies to this topic

#1 Twentyoneth

Twentyoneth
  • Members
  • PipPipPip
  • Advanced Member
  • 118 posts
  • LocationGlasgow, KY

Posted 16 May 2006 - 05:11 AM

I have a slight problem, I have a table that is set to 100% width and 100%height, I need the div tag inside of it to be the same.

The table that is set to 100% width and 100% height, is in another table, so it has a set width and height, based upon the size of the window, but I need the div to have scrollbars.

This is the section of my code:
<td vAlign='top' width='100%' height='100%' align='center' bgColor='#ffffff'>
    <div style='width: 100%; height: 100%; position: absolute; overflow: auto;'>

Any ideas on how to get the scroll bar to show up for only the size of the table it's in, instead of the size of the entire page, starting from where the table is placed?

This is what it does:

+--------------------------------+
+--------------------------------+
+---+------------------------+---+
+---+------------------------+---+
+---+------------------------+---+
    +------------------------+
    +------------------------+


#2 rburch

rburch
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 16 May 2006 - 05:29 AM

You can't do this. Layers (div) work independant of tables or the rest of the page - kinda like floating over the top of the webpage, so they can't be contained inside the table. You will have to decide on a size smaller than the table and stick to it. [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /]
"...there's a difference between knowing the path and walking the path." - The Matrix

#3 Twentyoneth

Twentyoneth
  • Members
  • PipPipPip
  • Advanced Member
  • 118 posts
  • LocationGlasgow, KY

Posted 16 May 2006 - 05:30 AM

Is there a better way to go about this?

[EDIT: I will use <iframe> to do it. ]

#4 rburch

rburch
  • Members
  • PipPip
  • Member
  • 10 posts

Posted 16 May 2006 - 05:45 AM

Or a pop-up window - they give you complete control over the page - size, scrollbar, buttons, etc. - lots of options...
"...there's a difference between knowing the path and walking the path." - The Matrix




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users