Jump to content

100% Width Tables


GhosteX

Recommended Posts

Hi. I'm having an issue with a website I am currently working on. I'm using a table that is divided into 3 sections. I want the table to stretch across the entire screen. I have one column fixed to 128px to the left of the screen and 128px to the right as well. This leaves the center row to stretch according to the size of the monitor or zoom level.This works perfectly if there is a large paragraph in the center column, but if there is minimal text or content, the whole table tends to shrink to that size. Does anyone know a fix to keep the width of the table 100% of the screen at all times? I tried both inline html and css to width: 100% but it doesn't work. I'll post the source.<table cellspacing="0" cellpadding="0"> <tr> <td colspan="3"> <div class="blacktitlebar">Welcome AdminPerson</div> </td> </tr> <tr>(These three table datas are the three columns) <td bgcolor="black" width=128px> <?php include("menuadmin.php") ?> </td> <td> <div class="content"> <?php include("testparagraph.php") ?> </div> </td> <td bgcolor="black" width=128px> </td> </tr> <tr> <td colspan="3"> <div class="freeblackband"></div> </td> </tr> <tr> <td colspan="3"> <div class="copyrightdiv"> Copyright © 2010 Carney Hill. Design by Paul Haskell </div> </td> </tr></table>Thanks in advance if anyone can think of something.

Link to comment
Share on other sites

the first thing I can think of is to not using tables for the layout of a websitethe second thing i can think of is googling three column layouts css

Link to comment
Share on other sites

Your widths should be set as either width=128orstyle="width:128px"I don't believe "width=128px" is a valid format.And the width of the table should be set on the <table> tag, ie <table style="width:100%">

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...