Jump to content

Unwanted line break after PayPal "buy now" button


Guest dougreding

Recommended Posts

Guest dougreding

Simple example table:http://www.coryreding.com/table.htmlForgive my ignorance, but I have been searching for an answer to this for a few hours to no avail. (Obviously I am new to XHTML)I want to add some PayPal "add to cart" buttons to a site I'm creating with Dreamweaver MX 2004. I created a table to house the buttons and item descriptions. Unfortunately there is a line break inserted after the button no matter what I have tried which screws up the alignment and look of the table / page. Apparently this line of code adds a line break no matter what one does:<input type="image" name="submit" src="http://images.paypal.com/images/x-click-but22.gif" border="0" />On the second row of this table I have simply inserted the "add to cart" button image with no form; this displays the alignment I need to do WITH the form (no line break). How might I use these form buttons without a line break?Many thanks to anyone who can offer suggestions. :)

Link to comment
Share on other sites

It is totally due to the location of your <form> tag.Place the <form> tag between your <table> and <tr> tag like this:

<table width="450"  border="1" cellpadding="2" cellspacing="0"><form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post"><tr valign="top"><td width="191"><strong>Remove line break?? </strong><br /></td><td width="245"><div align="right"><input type="hidden" name="cmd" value="_cart" /><input type="hidden" name="add" value="1" /><input type="hidden" name="bn" value="webassist.dreamweaver.4_0_3" /><input type="hidden" name="business" value="test@test.com" /><input type="hidden" name="item_name" value="Item A" /><input type="hidden" name="amount" value="9.99" /><input type="hidden" name="currency_code" value="USD" /><input type="hidden" name="receiver_email" value="test@test.com" /><input type="hidden" name="no_shipping" value="0" /><input type="hidden" name="no_note" value="0" /><input type="image" name="submit" src="http://images.paypal.com/images/x-click-but22.gif" border="0" /></div></td></tr><tr><td>No line break<br /></td><td><div align="right"><img src="http://images.paypal.com/images/x-click-but22.gif" width="87" height="23"><br /></div></td></tr></form></table>

Form tags end up rendering like <p> tags depending on where they are used.Let me know if this helps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...