sspoke Posted June 6, 2010 Share Posted June 6, 2010 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? Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/ Share on other sites More sharing options...
sspoke Posted June 6, 2010 Author Share Posted June 6, 2010 So what are my options anyone know? bump I'm guessing it's not that much of a HTML question but cmon guys just tell me what to do so i can mark it as solved before someone evil decides to move this! Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1068758 Share on other sites More sharing options...
ignace Posted June 7, 2010 Share Posted June 7, 2010 before someone evil decides to move this! BAD, BAD mods! How dare you keep this forum clean!! So what are my options anyone know? Learn HTML & CSS? Pay someone to do it for you? What is it exactly you want to appear? Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1068889 Share on other sites More sharing options...
TOA Posted June 7, 2010 Share Posted June 7, 2010 Might just be a browser issue, what browser is that? Ex. IE doesn't like floats very well. Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1068976 Share on other sites More sharing options...
sspoke Posted June 7, 2010 Author Share Posted June 7, 2010 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 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.. Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1069053 Share on other sites More sharing options...
sspoke Posted June 9, 2010 Author Share Posted June 9, 2010 yah still cannot find any css code to do this Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1070038 Share on other sites More sharing options...
kenrbnsn Posted June 9, 2010 Share Posted June 9, 2010 This has nothing to do with PHP, so I'm moving it to the CSS area. Ken Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1070040 Share on other sites More sharing options...
sspoke Posted June 9, 2010 Author Share Posted June 9, 2010 okay so what are my options? Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1070123 Share on other sites More sharing options...
haku Posted June 10, 2010 Share Posted June 10, 2010 Float all three <li> elements left. Give the first two a right margin. Give the <ul> tag a fixed width that equal to the width of the three <li> tags plus the spaces between them, then center the <ul> tag. Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1070179 Share on other sites More sharing options...
sspoke Posted June 10, 2010 Author Share Posted June 10, 2010 <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> Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1070197 Share on other sites More sharing options...
haku Posted June 10, 2010 Share Posted June 10, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1070202 Share on other sites More sharing options...
sspoke Posted June 10, 2010 Author Share Posted June 10, 2010 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! 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 Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1070215 Share on other sites More sharing options...
haku Posted June 10, 2010 Share Posted June 10, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1070317 Share on other sites More sharing options...
sspoke Posted June 12, 2010 Author Share Posted June 12, 2010 you're the only person who helped me out it wasn't sarcasm even though i didn't use your method because i didn't understand wtf u were saying. Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1071087 Share on other sites More sharing options...
ignace Posted June 12, 2010 Share Posted June 12, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/204043-2-forms-2-input-image-buttons-how-to-align-them-side-by-side/#findComment-1071098 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.