Jump to content

2 Forms 2 input image buttons how to align them side by side?


sspoke

Recommended Posts

pretty much making a checkout cart in PHP which contains a image button to update quantity. Then later on  it generates a form to paypal that form also has a image button now since the paypal form thats generated is outside the actual form for update quantity for php script.

 

they come out looking wrong the php form image is higher then the paypal image and i know if i put it inside the form for updating quantity the paypal form won't function.

 

What can i do? instead of CSS well I tried CSS too didn't work. Can someone just save a html copy of the buttons in correct places for me? I'll paste html generated code i'll fix the generation in php with the html code u guys can provide if u guys want to help me that is yah thanks alot

 

<div class="mbx">
  <h2>Freyr
  </h2>
  <div class="mbin">
    <div id="svr">
      <ul>
        <li style="float:left;">
          <a href="index.php?page=gran">
            <img src="index_files/granbig.PNG" width="70" height="29">
            <b>Buy Gran
            </b>
          </a>
        </li>
        <li style="margin:auto; margin-left:25px;">
          <a href="index.php?page=crystals">
            <img src="index_files/avcfs.PNG" width="166" height="34">
            <b>Buy Awakening Crystal Fragments
            </b>
          </a>
        </li>
        <li style="float:right;">
          <a href="index.php?page=powerlevel">
            <img src="index_files/powerlevel.gif">
            <b>Buy Powerlevel your account!
            </b>
          </a>
        </li>
      </ul>
    </div>
    <p>You have 
      <a href="index.php?page=cart">5 items in your shopping cart
      </a>
    </p>
    <div id="contents">
      <h1>Please check quantities...
      </h1>
      <form action="index.php?action=update" method="post" id="cart">
        <table id="tbl_product">
          <tbody>
            <tr>
              <th colspan="6">Will be contacted on character [
                <span style="font-weight:bold;color:red;">haha
                </span>]
              </th>
            </tr>
            <tr>
              <th>Product Image
              </th>
              <th>Product Name
              </th>
              <th>Price per unit
              </th>
              <th>Quantity
              </th>
              <th>Sub Total
              </th>
              <th>Remove Item
              </th>
            </tr>
            <tr>
              <td>
                <img src="index_files/acflvl4.PNG" style="display: block; margin-left: auto; margin-right: auto;">
              </td>
              <td>1 x Awakening Crystal Fragment Level 4
              </td>
              <td>$1.50
              </td>
              <td align="center">
                <input type="text" name="qty1" value="1" size="1" maxlength="3">
              </td>
              <td align="right">$1.50
              </td>
              <td align="center">
                <a href="index.php?action=delete&id=1" class="r">Remove
                </a>
              </td>
            </tr>
            <tr>
              <td>
                <img src="index_files/acflvl2set.PNG" style="display: block; margin-left: auto; margin-right: auto;">
              </td>
              <td>6 x Awakening Crystal Fragment Level 2
              </td>
              <td>$3.00
              </td>
              <td align="center">
                <input type="text" name="qty2" value="1" size="1" maxlength="3">
              </td>
              <td align="right">$3.00
              </td>
              <td align="center">
                <a href="index.php?action=delete&id=2" class="r">Remove
                </a>
              </td>
            </tr>
            <tr>
              <td>
                <img src="index_files/8mgran.PNG" style="display: block; margin-left: auto; margin-right: auto;">
              </td>
              <td>8M Gran [Freyr]
              </td>
              <td>$79.65
              </td>
              <td align="center">
                <input type="text" name="qty3" value="1" size="1" maxlength="3">
              </td>
              <td align="right">$79.65
              </td>
              <td align="center">
                <a href="index.php?action=delete&id=3" class="r">Remove
                </a>
              </td>
            </tr>
            <tr>
              <td>
                <img src="index_files/30mgran.PNG" style="display: block; margin-left: auto; margin-right: auto;">
              </td>
              <td>30M Gran [Freyr]
              </td>
              <td>$298.50
              </td>
              <td align="center">
                <input type="text" name="qty4" value="1" size="1" maxlength="3">
              </td>
              <td align="right">$298.50
              </td>
              <td align="center">
                <a href="index.php?action=delete&id=4" class="r">Remove
                </a>
              </td>
            </tr>
          </tbody>
        </table>
        <table id="tbl_product">
          <tbody>
            <tr>
              <th>Login Email
              </th>
              <th>Power Leveling Name
              </th>
              <th>Power level
              </th>
              <th>Quantity
              </th>
              <th>Sub Total
              </th>
              <th>Remove Item
              </th>
            </tr>
            <tr>
              <td>234
              </td>
              <td>haha
              </td>
              <td>(1-60)
              </td>
              <td align="center">
                <input type="text" name="qty0" value="1" size="1" maxlength="3">
              </td>
              <td align="right">$96.00
              </td>
              <td align="center">
                <a href="index.php?action=delete&id=0" class="r">Remove
                </a>
              </td>
            </tr>
          </tbody>
        </table>
        <p align="center">Grand total: 
          <strong>$478.65
          </strong>
        </p>
        <a href="index.php">
          <img src="index_files/more.png" style="float:left; margin-left:110px;">
        </a>
        <input type="image" src="index_files/cart.png" style="display:block; margin:auto;">
      </form>
      <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
        <input type="hidden" name="cmd" value="_cart">
        <input type="hidden" name="upload" value="1">
        <input type="hidden" name="business" value="punniabi@gmail.com">
        <input type="hidden" name="currency_code" value="USD">
        <input type="hidden" name="item_number_1" value="234:234">
        <input type="hidden" name="item_name_1" value="haha(1-60)">
        <input type="hidden" name="amount_1" value="96">
        <input type="hidden" name="quantity_1" value="1">
        <input type="hidden" name="item_number_2" value="haha">
        <input type="hidden" name="item_name_2" value="1 x Awakening Crystal Fragment Level 4">
        <input type="hidden" name="amount_2" value="1.50">
        <input type="hidden" name="quantity_2" value="1">
        <input type="hidden" name="item_number_3" value="haha">
        <input type="hidden" name="item_name_3" value="6 x Awakening Crystal Fragment Level 2">
        <input type="hidden" name="amount_3" value="3.00">
        <input type="hidden" name="quantity_3" value="1">
        <input type="hidden" name="item_number_4" value="haha">
        <input type="hidden" name="item_name_4" value="8M Gran [Freyr]">
        <input type="hidden" name="amount_4" value="79.65">
        <input type="hidden" name="quantity_4" value="1">
        <input type="hidden" name="item_number_5" value="haha">
        <input type="hidden" name="item_name_5" value="30M Gran [Freyr]">
        <input type="hidden" name="amount_5" value="298.50">
        <input type="hidden" name="quantity_5" value="1">
        <input type="image" src="index_files/checkout.png" style="float:right; margin-right:90px;">
      </form>
    </div>
  </div>
</div>

 

 

see how bad buttons look?

seehowbad.png

Link to comment
Share on other sites

see how horrible  Browse More items, Update Cart, checkout Now With Paypal looks i tried a ton of CSS tricks none of them do the job correctly.

 

I have to wrap somehow both forms in a huge css blanket then maybe i can do some relative positioning. But i have no clue.

 

here is what I want (I didn't center it correctly just eyeballed it but yeah the css should do this automatic anyways

yah.png

 

Well maybe some links then if you guys can't do it to help me go in correct direction i looked at most of them though..

Link to comment
Share on other sites

 

        <a href="index.php">

          <img src="index_files/more.png" style="float:left; margin-left:110px;">

        </a>

        <input type="image" src="index_files/cart.png" style="display:block; margin:auto;">

      </form>

...

        <input type="image" src="index_files/checkout.png" style="float:right; margin-right:90px;">

      </form>

 

Link to comment
Share on other sites

Sorry, I only glanced at your original code.

 

The principle is still the same though - put all three elements in a fixed sized container, float them all left, give the first two a right margin, and make the container the width of the three elements plus the two margins.

Link to comment
Share on other sites

well i know you guys didnt want to help me out either because you didn't know how or most likely because it boils you to see someone trying to turn a profit but I suffered it out and figured it out myself and check this out, pixel perfect!

 

hahaui.png

 

btw guys, this website im making is for an online rpg game which I hacked and have the ability to generate any item I want or any level account so I am going to make a HUGE profit just wanted to rub that in to the boilers out there.

 

Thanks alot haku

 

 

Link to comment
Share on other sites

Thanks alot haku

I'm not sure if this was sarcasm or not, but I did try to help you out, so I'm not sure what you meant with your comment:

 

well i know you guys didnt want to help me out

 

So if it was sarcasm, it was off base.

 

As for turning a profit, good luck on that. Thinking you are going to turn a profit and actually turning a profit are two entirely different things. Millions have thought they were going to make a lot of money on something, but only a select few do. Hopefully your final product and business acumen is good enough to make you one of the latter.

Link to comment
Share on other sites

btw guys, this website im making is for an online rpg game which I hacked and have the ability to generate any item I want or any level account so I am going to make a HUGE profit just wanted to rub that in to the boilers out there.

 

1. I doubt you'll generate a HUGE profit, I hope you'll have something left after you paid all your expenses.

2. We don't have to help you, this forum is on a voluntary basis. If you want help-on-demand, pay someone.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.