TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 269
  • Total: 269

HTML block sizing problem

Started by NHBGEAR, January 12, 2007, 03:54:13 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

NHBGEAR

I'm trying to add a email signup form to a block. I'm shooting for this:



but I get this instead:



Here is the basic code which seems to display correctly in straight HTML:

<div align="center">
<table border="0" cellspacing="0" cellpadding="3" bgcolor="#990000" style="border:2px solid #FFFFFF;">
<tr>
<td align="center" style="font-weight: bold; font-family:'Trebuchet MS',Verdana,Helvetica,sans-serif; font-size:16px; color:#FFFFFF;">NHB NEWS</td>
</tr>
<tr>
<td align="center" style="border-top:2px solid #FFFFFF">
<form name="optin" action="http://newsletter.com/d.jsp" target="_blank" method="post" style="margin-bottom:2;">
<input type="hidden" name="m" value="xxxxxxxxxxx">
<input type="hidden" name="p" value="xx">
<font style="font-weight: normal; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:12px; color:#FFFFFF;">Email:</font> <input type="text" name="ea" size="20" value="" style="font-size:10pt; border:1px solid #999999;">
<input type="submit" name="go" value="Go" class="submit" style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:10pt;">
</form>
</td>
</tr>
</table>
</div>


Any ideas? Can't figure out why it creates so much space in the table and why it's spaced like that in the block. BTW, I'm programming-challenged so if this is painfully obvious please don't hold it against me  ;)

thx

SMF 1.1.1 w/ TP 0.9.7.1 and Helios

jacortina

I think that the HTML/BBC block treats line breaks within your definition of the block as literals (adding line-breaks to the output).

You can try a version of your code without line-breaks:
<div align="center"><table border="0" cellspacing="0" cellpadding="3" bgcolor="#990000" style="border:2px solid #FFFFFF;"><tr><td align="center" style="font-weight: bold; font-family:'Trebuchet MS',Verdana,Helvetica,sans-serif; font-size:16px; color:#FFFFFF;">NHB NEWS</td></tr><tr><td align="center" style="border-top:2px solid #FFFFFF"><form name="optin" action="http://newsletter.com/d.jsp" target="_blank" method="post" style="margin-bottom:2;"><input type="hidden" name="m" value="xxxxxxxxxxx"><input type="hidden" name="p" value="xx"><font style="font-weight: normal; font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:12px; color:#FFFFFF;">Email:</font> <input type="text" name="ea" size="20" value="" style="font-size:10pt; border:1px solid #999999;"><input type="submit" name="go" value="Go" class="submit" style="font-family:Verdana,Geneva,Arial,Helvetica,sans-serif; font-size:10pt;"></form></td></tr></table></div>

Or, I believe, you can use a scriptbox block type.

NHBGEAR

That was it! Thanks very much, JAC.

This website is proudly hosted on Crocweb Cloud Website Hosting.