Posting HTML

giacomo

Well-known Member
Joined
Feb 20, 2002
Messages
1,796
Why the huge gaps between my tables when I post HTML?
<table border = 1>
<tr><th colspan =3 align = center >tblEvent</th></tr>
<tr><th>eventID</th><th>EventName</th></tr>
<tr><td>1</td><td>Some Race</td></tr>
<tr><td>2</td><td>Some Other Race</tr>
<tr><td>3</td><td>Yet Another Race</td></tr>
</table>
<table border = 1>
<tr><th colspan =3 align = center >tblName</th></tr>
<tr><th>RacerID</th><th>Name</th></tr>
<tr><td>1</td><td>John</td></tr>
<tr><td>2</td><td>Paul</tr>
<tr><td>3</td><td>George</td></tr>
<tr><td>4</td><td>Ringo</td></tr>
</table>
<table border = 1>
<tr><th colspan =3 align = center >tblRacerEventJoin</th></tr>
<tr><th>EventID</th><th>RacerID</th><th>Placement</th></tr>
<tr><td>1</td><td>1</td><td>3</td></tr>
<tr><td>1</td><td>2</td><td>1</td></tr>
<tr><td>1</td><td>3</td><td>2</td></tr>
<tr><td>2</td><td>1</td><td>1</td></tr>
<tr><td>2</td><td>3</td><td>2</td></tr>
<tr><td>2</td><td>4</td><td>3</td></tr>
<tr><td>3</td><td>2</td><td>1</td></tr>
<tr><td>3</td><td>3</td><td>2</td></tr>
<tr><td>3</td><td>4</td><td>3</td></tr>
<tr><td>4</td><td>1</td><td>3</td></tr>
<tr><td>4</td><td>2</td><td>2</td></tr>
<tr><td>4</td><td>4</td><td>1</td></tr>
</table>

Code:
<table border = 1>
<tr><th colspan =3 align = center >tblEvent</th></tr>
<tr><th>eventID</th><th>EventName</th></tr> 
<tr><td>1</td><td>Some Race</td></tr>
<tr><td>2</td><td>Some Other Race</tr>
<tr><td>3</td><td>Yet Another Race</td></tr> 
</table>
<table border = 1>
<tr><th colspan =3 align = center >tblName</th></tr>
<tr><th>RacerID</th><th>Name</th></tr>
<tr><td>1</td><td>John</td></tr> 
<tr><td>2</td><td>Paul</tr>
<tr><td>3</td><td>George</td></tr>
<tr><td>4</td><td>Ringo</td></tr>
</table> 
<table border = 1>
<tr><th colspan =3 align = center >tblRacerEventJoin</th></tr>
<tr><th>EventID</th><th>RacerID</th><th>Placement</th></tr>
<tr><td>1</td><td>1</td><td>3</td></tr> 
<tr><td>1</td><td>2</td><td>1</td></tr>
<tr><td>1</td><td>3</td><td>2</td></tr>
<tr><td>2</td><td>1</td><td>1</td></tr> 
<tr><td>2</td><td>3</td><td>2</td></tr>
<tr><td>2</td><td>4</td><td>3</td></tr>
<tr><td>3</td><td>2</td><td>1</td></tr> 
<tr><td>3</td><td>3</td><td>2</td></tr>
<tr><td>3</td><td>4</td><td>3</td></tr>
<tr><td>4</td><td>1</td><td>3</td></tr> 
<tr><td>4</td><td>2</td><td>2</td></tr>
<tr><td>4</td><td>4</td><td>1</td></tr>
</table>

Giacomo
 
giacomo

It's because the HTML code is all on different lines.

<table border = 1><tr><th colspan =3 align = center >tblEvent</th></tr><tr><th>eventID</th><th>EventName</th></tr><tr><td>1</td><td>Some Race</td></tr><tr><td>2</td><td>Some Other Race</tr><tr><td>3</td><td>Yet Another Race</td></tr></table><table border = 1><tr><th colspan =3 align = center >tblName</th></tr><tr><th>RacerID</th><th>Name</th></tr><tr><td>1</td><td>John</td></tr><tr><td>2</td><td>Paul</tr><tr><td>3</td><td>George</td></tr><tr><td>4</td><td>Ringo</td></tr></table><table border = 1><tr><th colspan =3 align = center >tblRacerEventJoin</th></tr><tr><th>EventID</th><th>RacerID</th><th>Placement</th></tr><tr><td>1</td><td>1</td><td>3</td></tr><tr><td>1</td><td>2</td><td>1</td></tr><tr><td>1</td><td>3</td><td>2</td></tr><tr><td>2</td><td>1</td><td>1</td></tr><tr><td>2</td><td>3</td><td>2</td></tr><tr><td>2</td><td>4</td><td>3</td></tr><tr><td>3</td><td>2</td><td>1</td></tr><tr><td>3</td><td>3</td><td>2</td></tr><tr><td>3</td><td>4</td><td>3</td></tr><tr><td>4</td><td>1</td><td>3</td></tr><tr><td>4</td><td>2</td><td>2</td></tr><tr><td>4</td><td>4</td><td>1</td></tr></table>
 
Norie,

Can you post the html you used?? Cause I'm still not getting it :oops:

G
 
oh, nevermind I got it now... it's kinda ugly when you do it that way though...
 
giacomo

I just removed the line breaks from your HTML.:)

At one time I actually had code that did that automatically but I lost it when I had to totally reboot my computer some time ago.
 
I just removed the line breaks from your HTML.
yep, that's what I ended up doing... at first I thought you meant just the line breaks between the < /table > and < table > statements. But then I realized I had to take them all out.

Thanks for your help, I went back and cleaned up the post that this all refers to and gave you your props: http://www.mrexcel.com/board2/viewtopic.php?t=226454&start=10

G
 
At one time I actually had code that did that automatically but I lost it when I had to totally reboot my computer some time ago.

There used to be a site up that would strip out the breaks, but it's dead. I managed to bring it up with the webarchive and snagged the (open source) code for it.

I have never really advertised this, but I currently have the code up--and running--here:
http://vonpookie.t35.com/excel/newlines.php

It's not pretty, but it should work.
 
Kristy

I think I've come across that before.

The code I had was, I think, totally run from Excel, or was it Access. :rolleyes:

Like I said it was some time ago I wrote/used it, and then I lost it. :oops:
 

Forum statistics

Threads
1,221,618
Messages
6,160,872
Members
451,674
Latest member
TJPsmt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top