View Full Version : table overflow help


blkshygurl
06-29-2003, 01:45 AM
I need help with one of my tables. I want the text to automatically scroll within the confines of the dimensions set for the table. Instead the text flows outside of the border, cauing a vertical scrollbar to occur on the whole page, instead of just in that partiular table like I want. Here isthe coding used for the table.

<div style="position:absolute; overflow:auto; overflow-x:hidden;" width="70%" height="100%" align="left">

Any help would be appreciated. :)

Dude128
06-29-2003, 02:17 AM
I'm not exactly sure, but it might have to do with the fact that you're using percentages for your width and height attributes. it may not be ideal, but try changing them to pixel values to see if that changes the div's behavior

blkshygurl
06-29-2003, 02:26 AM
I thought using pixel values wasn't recomended if you wanted to have cross screen resolution compatibility. I figured using percentage values would allow the page to look just about the same on all comps.

Dude128
06-29-2003, 02:32 AM
yes, percentages are better at allowing the layout to remain reasonably the same across resolutions, but I think it might have something to do with your problem. but, I'm not even positive, it's really just a guess :P

blkshygurl
06-29-2003, 02:35 AM
Thanks anyways, maybe i will just have to use the css somebody else recommended. *sad shrug*lol, this is tough to figure out.

Pange
06-29-2003, 08:43 PM
I think it's because of this: overflow-x:hidden

x is a horizontal <--> overflow, and you want a vertical overflow ^ So if you change x to y, it should stop it from spilling out of the table.

Just a random note: since it's hidden, the text that goes out of the table won't be visible at all. If you change "hidden" to "auto", a scrollbar will appear inside the table to let the user scroll inside the DIV layer without causing a scrollbar to be on the page itself. You don't need to change that or anything, I just thought I'd let you know, hehe. :D

blkshygurl
06-29-2003, 10:27 PM
But i also think my div values and crap are messed up. So I have to look into that too.

kittycat
06-29-2003, 10:39 PM
I've found that the width and height for divs works better when you have it included with the style stuff, so it's width:70%; height:100%; (or whatever your code is). Try changing that bit just to see if it makes a difference.