homepage Welcome to WebmasterWorld Guest from 54.226.213.228
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
Forum Library, Charter, Moderator: open

WYSIWYG and Text Code Editors Forum

    
why does dreamweaver do this? (tables)
traaacker




msg:940826
 10:09 am on Feb 27, 2006 (gmt 0)

I have had this problem before. I have a simple 6 cell table. The outside cells are for my boarders. I have the center set to 100% size so the outer cells should collapse to the size of the images.

I had some problems before because I didnt set all the other outer cells to 0%. But now I did, you can still see that they are not collapsing right. The cells on the sides have collapsed, but not on the top and bottom. Am I missing something?

[edited by: engine at 10:37 am (utc) on Feb. 27, 2006]
[edit reason] See TOS [webmasterworld.com] [/edit]

 

SuzyUK




msg:940827
 11:02 am on Feb 27, 2006 (gmt 0)

can you post the table code for us..

and also which DTD (Doctype) if any are you using

Suzy

traaacker




msg:940828
 3:41 pm on Feb 27, 2006 (gmt 0)

Grrr, editing out my image will make this harder for someone to understand, but ok then I guess if that's the rules...

Here is my table code.

<table width="387" height="153" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="0" height="0%" class="vbordertile"><div align="left">
<p class="hbordertile">&nbsp;</p>
</div></td>
<td width="100%" height="0%" class="hBorderTileTop">&nbsp;</td>
<td width="0" height="0%" class="hbordertile"><div align="right">
<p class="vbordertile">&nbsp;</p>
</div></td>
</tr>
<tr>
<td width="0%" class="vBorderTileLeft">&nbsp;</td>
<td width="100%" height="100%" align="center"><div align="center">
<p>This is the middle Cell.</p>

</div></td>
<td width="0" height="115" class="vBorderTileRight">&nbsp;</td>
</tr>
<tr>
<td width="0" height="0" class="vbordertile">&nbsp;</td>
<td width="100%" height="0" valign="bottom" class="hBorderTileTop">&nbsp;</td>
<td width="0" height="0" class="hbordertile">&nbsp;</td>
</tr>
</table>

And here is the css:
.vBorderTileRight {
background-image: url(/border_vside.gif);
background-repeat: repeat-y;
right: 10px;
background-position: right;
}
.vBorderTileLeft {
background-image: url(/border_vside.gif);
background-repeat: repeat-y;
right: 10px;
background-position: left;
}
.hBorderTileTop {
background-image: url(/border_hside.gif);
background-repeat: repeat-x;
background-position: top;
}

And here is the very top of the code:
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">";?>
<!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">

traaacker




msg:940829
 3:57 am on Feb 28, 2006 (gmt 0)

Hmm, no replies. I guess it's a lot harder to understand the problem without seeing the simple picture.

dareRock




msg:940830
 1:58 pm on Feb 28, 2006 (gmt 0)

im guessing here that the borders for this have width value - moreover, the border graphics you created, and are adding via css, are not 0px wide. So, you may need to manually set the width of the first cell, in the first row of the table. Once the first is set, the first cell of the second and third rows will inherit the width value. You can do this in the actual <td> tag or in the css.

khell




msg:940831
 11:23 am on Mar 8, 2006 (gmt 0)

If you put an <img width="300" ...> in a <td width="100" ...> the cell will autosize to 300px.

But if now you take out the image and set the background of the cell to a image with a width of 300px the cell will not resize.

You either put actualy <img> elements in the cells or set the heights and widths accordingly to the cells. In your case i think the second aproach is the solution to what you want.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved