<div> tag help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
deeessay
Forum Commoner
Posts: 55
Joined: Sat May 24, 2008 1:02 am

<div> tag help

Post by deeessay »

Ok, so i added a

<div id='#####' style="overflow:auto;height:120px;width:100%;padding:0px;">

before my table so the the table will be displayed in a fixed frame. no problem with that...

my problem is this: once the table exceeded the height defined in the <div> tag, a scroll bar will appear in
the right side of the table. the scroll bar seems to throw the columns in the table out of alignment.
the header columns are no longer aligned with the data columns.

How do you fix this?
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

Re: <div> tag help

Post by Eran »

How about.. removing the height property? What you described is the browser natural behavior. It runs out of room - it opens scrollbars
User avatar
deeessay
Forum Commoner
Posts: 55
Joined: Sat May 24, 2008 1:02 am

Re: <div> tag help

Post by deeessay »

hey thanks for the suggestion. But I found a way to fix it. I created another table and placed the whole thing inside the <td> of the table and adjusted the size so the it fits the screen. Everything including the freaking scroll bar are trapped inside <sinister laugh> bhahahaha!!!
Post Reply