www.webdeveloper.com
Results 1 to 2 of 2

Thread: some help with div overflow

  1. #1
    Join Date
    Feb 2005
    Location
    Middle Village, NY
    Posts
    203

    some help with div overflow

    hey, not sure if this should be in the css section or not but ill ask here anyway.

    i have a <div> now inside this div i have a table the table is displaying data drom a db using php. now when u open the page and everything is displayed in the <div> it doesnt overflow. all the information from the database that is being put into the table is being smooshed together. even if i change the <td> <table> sizes to make them bigger everything still get smooshed together. heres my code

    for the div:
    Code:
    <div id="admin_info">
    		<div id="sub_headers">
    			<span class="add_text">Admin Information:</span>
    		</div>
    		
    			<table cellpadding="0" cellspacing="0">
    				<tr>
    					<td colspan="6">admin listing</td>
    				</tr>
    				<tr>
    					<td >Id</td>
    					<td >First Name</td>
    					<td >Last Name</td>
    					<td >User Name</td>
    					<td >Email Address</td>
    					<td >Last Login</td>
    				$string_admins
    			</table>
    		
    	</div>
    css for the div:
    Code:
    div#admin_info{
    background-color:#FFFFFF;
    position:absolute;
    top:13%;
    left:44%;
    height:37%;
    width:40%;
    border:solid 1px #000000;
    overflow:auto;
    }

  2. #2
    Join Date
    Apr 2006
    Posts
    120
    When I tested it with hardcoded data to fill the table, it worked fine. I would recommend adding nowrap to the <td>'s though. If the content data wasn't long enough the table did look smooshed together, but with long enough data, I got the scroll.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles