PDA

View Full Version : How to set column width to absolute values?


foxtrotfrog
02-20-2009, 03:04 PM
I'm working with a large table with 3 columns, which I set to the values I want. Then at some point while entering data, DreamWeaver changes the column widths and I cannot get them back to the original dimensions.
I've tried selecting the columns and putting in the values I want- but at the top of the column I get this:
Table Width = (690)
Column Info = 230(220) / 230(207) / 230(263)
The values I want are 3 equal columns of 230(pixels), but Dreamweaver continually changes the values. I cannot drag the columns to the size I want. Dreamweaver won't let me change the physical dimensions of the third column.
Is there a way to enter code in the table definition lines to set the columns to absolute values?
Thanks

edbr
02-21-2009, 02:16 AM
tables suck dont they? you could try using divs

edbr
02-21-2009, 02:27 AM
just to help heres a page with a div with 3 columns in side I changed the column widths due to adding borders. IHopefully it will start you off on thev css trail.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.tablediv {
float: left;
border: thin solid #999;
position:relative;
width:690px;
}
.collumndiv {
float: left;
border: thin solid #999;
position:relative;
width:225px;
}
-->

</style></head>

<body >
<div class="tablediv">

<div class="collumndiv">content collumndiv 1</div>
<div class="collumndiv">content collumndiv 2</div>
<div class="collumndiv">content collumndiv 3</div>
</div>
</body>
</html>

foxtrotfrog
03-01-2009, 06:22 PM
Thanks for the code, I may have gotten around the problem by changing the table width to a percentage, and then I inserted a very tiny, 3 px by 250 px image under the column heading. It seems to have kept Internet Explorer from collapsing the column. I wanted to maintain the ability to sort the columns, but I will have to try it with the div cod you sent.
Thanks