Set Table with from CSS Class

powerman

Gawd
Joined
May 21, 2002
Messages
562
I am tyring to set the width of a table in a CSS class but I can't figure out how to do it. Ntohing seems to change when the code below is used. I expect an extremely large table for test purposes. Here is my code:

Code:
--- CSS Sheet -----
.threeColTable {
table-layout:fixed;
width:1750;
}

Code:
--- page ----

<link rel="stylesheet" type="text/css" href="andreas01.css" media="screen,projection" />
......
<table class="threeColTable">
   <tr>
         <td>.......</td>
   </tr>
</table>

My goal is the equivlent of <table width=1750>, but just in a CSS sheet. This has been driving me crazy the whole day. I looked at W3 but I still can't figure it out.

http://www.w3.org/TR/REC-CSS2/visudet.html#the-width-property
http://www.w3.org/TR/CSS21/tables.html#width-layout

Any ideas? Thanks for the help.
 
I tried your code and when I added a border, the width was set correctly. I would suggest using width:1750px; with your code. You can also try and inline css statement.

table style="width:1750px" border="1"

Try that to see if it works.
 
Back
Top