Laying out tables

liunx

Guest
Right.. I have been working on laying out a table as a navbar for my companies web site for a few days. I was taking existing code and rewriting it to better use styles etc.. and I couldn't figure out why the layout was getting screwed around, I mean I had practically the same code.. <br />
something like:<br />
<br />
<td><br />
<img src=http://www.htmlforums.com/archive/index.php/"bob.jpg" /><br />
</td><br />
<br />
and it was really badly layed out, eventually I did<br />
<br />
<td><br />
<img src=http://www.htmlforums.com/archive/index.php/"bob.jpg" /></td><br />
<br />
and low and behold it was formatted correctly. I am using textpad to edit my HTML.. but as far as I understood it, whitespace and carriage returns are ignored in HTML. So why does having the closing table data cell on the same line work? I just want to understand this, thanks for your time<!--content-->A carriage return, which is not the first character on a line, results as a whitespace.<br />
<br />
...I suppose.<!--content-->That is a browser issue. Depending on how a browser interprets a carriage return in HTML. I try to make all my tables like this: <br />
<table><br />
<tr><br />
<td>Stuff</td><br />
</tr><br />
</table><br />
<br />
I hope this helps.<br />
;)<!--content-->
 
Back
Top