PDA

View Full Version : Tables not right size and fall apart...


keano
05-11-2006, 08:34 PM
If I insert a table from excel or create my own in DW it looks fine small thin cells (height wise) but when previewed in a brower the cells are large and lok nothing like whats in DW?

What am I doing wrong?

blanchard
05-11-2006, 10:00 PM
helo keano,
Change your paragraph setting to none

keano
05-12-2006, 04:34 PM
doesn't work. here attached is a sample. the first line is the correct size in DW but when viewed in a browser it changes size.

johnph77
05-12-2006, 06:59 PM
"height" is not supported in the "tr" tag, but it ought to work in the "th" or "td" tag.

You can remove the "col width" tag since you've specified that in your "td" tags.

It is only necessary in your table to have each row width and column height specified once, preferably in the topmost row or the leftmost column of your table. Except for the headers, you can also specify your height and width in your <style> tag or ".css" file and remove those declarations altogether.

My suggestion? Remove all height and width references from the body. Make your top row either "th" tags or specify a class for "td" tags. In your style declaration specify the height and width you desire. For the rest of the rows use "td" tags and specify the height you desire.

<style>
.style11 {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; }
th {height: "34"; width: "131";}
td {height: "51";}
</style>

Please also note that the font size is specified as "pt", not "px". If you don't want the text inside the "th" tag to be boldface and centered you can also specify that in your style declaration.

domedia
05-12-2006, 08:00 PM
<style>
.style11 {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; }
th {height: "34"; width: "131";}
td {height: "51";}
</style>


Just a quick rewrite to make it work :)
<style>
.style11 {font-family: Arial, Helvetica, sans-serif; font-size: 10pt; }
th {height: 34px; width: 131px;}
td {height: 51px;}
</style>

d a v e
05-13-2006, 04:21 AM
and points are only for print stylesheets, of course: use ems or percentages instead ;)