Site help pls

Permabanned
Joined
22 Apr 2007
Posts
1,805
Hi,

Many of you know the site by now:

www.bournetechnology.co.uk

I'm having problems though.

I'm implementing a very simple online shop which uses the paypal button to send users to the paypal site.

When you do this, Paypal give you HTML code using the 'form' process.

However, in my CSS I've defined form properties already for an enquiry form:-

www.bournetechnology.co.uk/enquiry.php

In the shop part, I'm using a simple table, defined in the CSS and adding the HTML code for Paypal button within a table cell as well.

The problem is, I want the paypal button centered under rest of the text and I can't figure out how to do it.

www.bournetechnology.co.uk/shop.php

Hoping someone can point me in the right direction.
 
You could try adding colspan="xx" to the particular <td> element the button sits in, where "xx" is the number of columns your table has.
 
Well, it kinda works.

It makes the columns very thin though and for some reason the last column doesn't change.

I changed it back.
 
I know it might be a bit of a rubbish fix and may or may not work but the specs are wrapped in a paragraph tag and it seems to center the text?(although I can't find where it does that) could you not wrap the form with the button in with another paragraph tag?
 
Have you tried centering the text using the <div> thingy.

Just above where you have your <form id code......>

Enter <div align="center">

at the end of the form code put </div> like this.

Code:
<div align="center">
    <form id="paypal" method="post" action="https://www.paypal.com/cgi-bin/webscr">
        <input type="hidden" value="_xclick" name="cmd"/>
        <input type="hidden" value="[email protected]" name="business"/>
        <input type="hidden" value="Media PC1" name="item_name"/>
        <input type="hidden" value="399.99" name="amount"/>
        <input type="hidden" value="9.99" name="shipping"/>
        <input type="hidden" value="0" name="no_shipping"/>
        <input type="hidden" value="1" name="no_note"/>
        <input type="hidden" value="GBP" name="currency_code"/>
        <input type="hidden" value="7" name="weight"/>
        <input type="hidden" value="kgs" name="weight_unit"/>
        <input type="hidden" value="GB" name="lc"/>
        <input type="hidden" value="PP-BuyNowBF" name="bn"/>
        <input class="noBorder" type="image" alt="Buy now!" name="submit" src="images/payb.gif"/>
    </form>
</div>

Its probably a sloppy way of doing things, but as im fairly new to the whole css/html thing its best i could think of.
 
Last edited:
W00t!

Done it, I added a class to my general form settings within the CSS

input.image

centered it and gave it a margin.

Thanks all
 
ffr/fyi:

I normally "float:left;" the p's when making a page like this, with a "clear:both;" on the last column, then the button I'd use "left:350px;margin-left:-40px;" and I'd use a button with a background-image and "border:none" instead of an img submit.
 
Back
Top Bottom