Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: incrediBILL
When a table is written in Notepad for example and you have hit return after a <td> tag like:
Will that break in line after the <td> tag show up as white space around the image. I have heard some one calling it "White space in your code." Just all the books, tutorials, sites and forums that I have ever read, it has never mentioned anything like this at all.
Hope some one can clear this up for me!
I have read on a forum that the above would cause a gap around the image, but the code below wouldnt have the gaps, as there are no line breaks. Nothing to do with the cellpadding in the <table> tag.
I just had ago myself and its only the closing tag </td> that has to be on the same line, not the opening one <td> as well.
Well I learn something new everyday... the adventure continues!
joined:Sept 26, 2001
In addition to what pageoneresults said, it is also poor syntax to "hit return" when writing any code. Not only does this habit add white space, but most editors (and thusly the browser) terminate the line. This can cause scripting errors and other problems, including those spaces around images.
Instead of hitting the return key, use your space bar.
A similar thing happens with code like this:
Netscape browsers will make the space after the text part of the link. This is especially ugly with code like:
<img src="home.gif" alt="Home" />
Here, you get the button with a little clickable _ next to it -- a blemish on your otherwise beautiful site.