Dreamweaver <tr><td> question

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

I have always had a problem with Dreamweaver inserting what I call "clutter code" like what I have put below. What I have is one table with two others inside of it. One for the left side navigation and the other for the body of the page. All of the code below leaves about a 5 inch blank space at the bottom of the web page and when I remove it the space goes away. Does anyone know what it going on here?

The first table tag that you see in the code is the close tag for the body table and the last close table tag is for the main table that has the tables in it for the body and left nav.

</table>
    </td>
    <td width="1"></td>
  </tr>
  <tr>
    <td></td>
    <td><img height="1" width="1" src="/spacer.gif"></td>
  </tr>
  <tr>
    <td></td>
    <td><img height="1" width="1" src="/spacer.gif"></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td><img height="1" width="1" src="/spacer.gif"></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td><img height="1" width="148" src="/spacer.gif"></td>
    <td></td>
    <td><img height="1" width="1" src="/spacer.gif"></td>
  </tr>
</table>
</body>
</html>
'

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

I'd have to see the whole code, but you should be able to delete all the extraneous rows. They aren't necessary.

Also, if you want those cells to be visible in Netscape, you better put something in them, even if it's just a non-breaking space.

Not to mention you have some extra cells in the last few rows. Not sure what's happening here without the rest of the code.

Smiling S

Delete this:

  <tr>
    <td></td>
    <td><img height="1" width="1" src="/spacer.gif"></td>
  </tr>
  <tr>
    <td></td>
    <td><img height="1" width="1" src="/spacer.gif"></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td><img height="1" width="1" src="/spacer.gif"></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td><img height="1" width="148" src="/spacer.gif"></td>
    <td></td>
    <td><img height="1" width="1" src="/spacer.gif"></td>
  </tr>
'

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

Hi Suzanne,

The site in question here is THIS ONE

I just finished looking all through the site and almost every page has that mess at the bottom of each table. I turned on all the tables borders on one of them and it looks a mess. Most of the I can remove but there are certain ones that if I remove it will make half the page disappear. I am not asking anyone to fix this for me...I was just wondering if there was something that I was doing wrong in Dreamweaver while building a page that causes this to happen. I didn't put those there. EEEK!!!

Also, If i put a non breaking space in the it makes a space of about 19 pixels appear so I can't do that.

I am at a loss as what I should do about all these extras here. The site looks fine in IE6. Any clues?

Busy's picture

He has: 6,151 posts

Joined: May 2001

Quote: I am at a loss as what I should do about all these extras here. The site looks fine in IE6. Any clues?

learn HTML enough so you can handcode everything Laughing out loud you'll find it can be faster than WYGIWYS editors sometimes.

FP is even worse at adding the extra space at the bottom.

anyways, for the non breaking space saga, use a font tag around it, I usualy use &nbsp; and if the cell is really small I add face="verdana" in there as well, also keep the non breaking space and/or font tags close to and inline with the table cell (td cell)

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

Cry

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

I think I have figured out something. It doesn't do this unless I make a column autostretch. If there is an adjacent cell, it adds a spacer image to it when I autostretch the other. It is the spacer images are throwing things off. Also, when it adds a spacer image it adds an extra in the column that I autostretched.
Does that make sense?

Busy's picture

He has: 6,151 posts

Joined: May 2001

I think so, you saying the spacers are being the problem and need to be :csaw: or :flame:,
:gandalf: hocus pocus, make the spacers behave

I dont think I have DW anymore, I wonder if there is an option to stop the spacers going in there, and if there is you could just manually insert non breaking spaces

**so many smilies I havent used yet :side:**

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

YEA YEA...ya finally catching on. Sorry I am not explaining my self very well.

I DONT WANT dreamweaver to automatically insert the dang spacers. Does ANYBODY know how to turn that terribly annoying feature off?

I tried the font trick but it still makes a space as big as adding the non breaking space.

They have: 93 posts

Joined: Dec 2001

I have the same proble with dreamweaver,
what I do now (in my efforts to learn HTML properly) is to create a page using dreamweaver & then edit it in Textpad.
I normally find that I can remove about 1/3 of the code without affecting the page layout.
As for handcoding a page from start to finish, someday soon I hope.

Mika

taff's picture

They have: 956 posts

Joined: Jun 2001

Quote: Originally posted by disaster-master
I DONT WANT dreamweaver to automatically insert the dang spacers. Does ANYBODY know how to turn that terribly annoying feature off?

In DW4:

Edit -- Preferences -- Layout View
Autoinsert Spacers -- Never!

Busy is right though - don't rely on DW for your code. DW is better than most WYSIWYG editors but nothing beats a text editor for really cleaning things up. Have you tried HomeSite?

.....

disaster-master's picture

She has: 2,154 posts

Joined: May 2001

Thanks Taff. You hit the nail on the head. That is exactly what I needed. I knew there had to be a way to do that but I guess I just overlooked the preferences. DUH!! Wink I have never really explored all the options or settings that you can change in DW. Most everything is still set at default. I believe this will solve my problems with all the extra stuff being inserted though.

I am going to D/L the trial for Homesite. Maybe I can talk hubbie into buying it for me.

I currently just use notepad to edit outside of DW. I used notepad only for almost 3 years before ever laying a hand on a WYSIWYG so I am pretty confident with handcoding. The problem is that after using DW for the past 8 months I have gotten spoiled and lazy.

I don't know what I would do without all you guys and gals. Thanks all....this case closed.Laughing out loud

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.