Why does this shortcode mess up my page
-
Hello. Can you please take a look at this page:
https://www.thesocketroll.com/productsr-blue/
and see why the shortcode [sc name=”Paypal “] is skewing my page.
I placed the code in the text section of the page first and then the visual section and still got the same skewed result.
Any information would be very helpful.
Thanks!
-
nothing to do with the theme.
seems to be a conflict of the CSS class
.container
which is both used by the theme and the shortcode function …what is the full code of the shortcode function?
are you using a plugin for that?
if yes, where did you get that plugin from?Hi cayindustries
Thanks for using our theme.
For products display to you can use eCommerce plugins.
This theme compatibility with eCommerce plugins.
For PayPal products to re-configure the this system in proper way.
Add the css as per products.
Now some css are conflict.
If you have more query let me know.
Thanks
@michael – I am not using a plugin and I thought the container would cause the issue. I tried to play with the padding, but no joy. Let me know what you think and how I could change it. Thanks.
Here is the complete code:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <div id="box"> <div id="innerbox"> <div id="headerbox"> <h4 id="price"><span id="pricestyle">price:</span>$34.99</h4> <h2 id="plus">+</h2> <h4 id="shipping"><span id="shipstyle">shipping:</span>$7.95</h4> <h2 id="total"><span>Total:</span>$42.94<span id="tax"> + tax</span></h2> <h6 id="Alternate">*If shipping outside the US please see alternate shipping costs below. Total price will be calculated on checkout page.</h5> </div> <div class="container"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="2ZF8FQ9RWU4ZS"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="item_name" value="The Socket Roll"> <input type="hidden" name="amount" value="34.99"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="button_subtype" value="services"> <input type="hidden" name="no_note" value="0"> <input type="hidden" name="cn" value="Add special instructions to the seller:"> <input type="hidden" name="no_shipping" value="2"> <input type="hidden" name="weight_unit" value="lbs"> <div id="position"> <label for="qty">Qty.</label> <input type="text" name="quantity" id="qty" size="3" value="1" required> <!-- Button Images --> <div id="ppImage"> <input type="image" src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/buy-logo-medium.png" border="0" name="submit" alt="Buy now with PayPal!"> </div> </div> <div id="accepted"> <input type="image" src=" https://openmerchantaccount.com/img/accepted_payment200x25px.png" alt="Accepted Payment Methods" /> </div> <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> </div> </div> <div class="moreShipping"> <ul class="no-js"> <li> <p class="clicker">+ Alternate Shipping Costs</p> <ul> <li>Alaska</li> <li>Hawaii</li> <li>Puerto Rico</li> <li>U.S. Virgin Islands</li> <li>- $9.95</li></br> <li>Canada and International</li> <li>- $29.95</li></br> </ul> </li> </ul> </div> <!--<p>+ Additional Shipping Costs</p>--> </div> <style> #box { top: 360px; right: 90px; width: 250px; border-radius: 10px; box-shadow: -3px 2px 8px rgba(77, 77, 77, 0.5); background-color: rgb(255, 255, 255); position: fixed; } #innerbox { width: 100%; height: 100%; position: relative; } #headerbox { background-color: rgb(245, 245, 245); border-radius: 10px 10px 0px 0px; border-bottom: 1px solid rgb(162, 162, 162); } #pricestyle { font-weight: 300; font-size: 13px; margin-right: 8px; color: rgb(107, 107, 107) } #price { width: 130px; padding-top: 10px; padding-bottom: 4px; margin: auto; } #plus { font-weight: 700; color: rgb(43, 43, 43) } #shipstyle { font-weight: 300; font-size:13px; margin-right: 8px; color: rgb(107, 107, 107) } #shipping { width: 130px; padding-bottom: 4px; border-bottom: 1px solid rgb(152, 152, 152); margin: auto; } h2,h4 { margin: 0px; text-align: center; font-family: "Open Sans",sans-serif; } h2 span { font-size: 13px; margin-right: 8px; font-weight: 300; color: rgb(107, 107, 107); } #total { padding: 2px 0px 6px 0px; } #tax { font-style: italic; color: rgb(0, 0, 0); } .container { width: 200px; height: 103px; margin: auto; padding:25px 0px; } h6 { margin: 0px; text-align: center; padding-top: 15px; padding-right: 20px; padding-bottom: 20px; padding-left: 20px; font-family: "Open Sans",sans-serif; font-weight: 400; color: rgb(107, 107, 107); } #position { width: 170px; margin: auto; } #qty { -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 3px; } #ppImage { padding-top: 20px; } #accepted { padding-top: 3px; } .moreShipping { margin-left:0px; font-family:"Open Sans",sans-serif; font-size: 13px; position: relative; color: rgb(56, 57, 134); padding-top: 0px; } .moreShipping ul { position: absolute; padding-left: 0px; margin-left: 0px; font-weight:600; } .moreShipping ul li ul { position:relative; padding-top: 20px; background-color: rgb(245, 245, 245); border-radius:0px 0px 10px 10px; border: 1px solid rgba(187, 185, 185, 0.89); box-shadow: -5px 7px 8px rgba(107, 104, 104, 0.27); left:0; right:0; } .moreShipping ul li ul li { padding-top: 0px; padding-bottom: 2px; background: transparent; } .moreShipping ul .clicker { position:relative; rgb(0, 0, 0); } .moreShipping ul .clicker:hover,.moreShipping ul .active{ color: rgb(56, 57, 134); } .moreShipping ul li { margin-left: 0px; cursor:pointer; transition:background-color 0.2s ease-in-out; -webkit-transition:background-color 0.2s ease-in-out; -moz-transition:background-color 0.2s ease-in-out; display:block; padding:8px 10px 8px 40px; background:#FFF; color:#333; text-decoration:none; } .moreShipping ul li :hover { background:#F2F2F2; } /* Fallbacks */ .moreShipping .no-js ul {display:none;} .moreShipping .no-js:hover ul {display:block;} </style> <script> $(function () { $('.moreShipping > ul').toggleClass('no-js js'); $('.moreShipping .js ul').hide(); $('.moreShipping .js').click(function(e) { $('.moreShipping .js ul').slideToggle(200); $('.clicker').toggleClass('active'); e.stopPropagation(); }); $(document).click(function() { if ($('.moreShipping .js ul').is(':visible')) { $('.moreShipping .js ul', this).slideUp(); $('.clicker').removeClass('active'); } }); }); </script>
@weblizar – The theme is great, Thank You!
I am not using eCommerce currently because I only have the one product, but I am aware of WooCommerce and what they can offer when the time comes.
As for the Paypal, I am not sure where to make the CSS adjustments but I am open to try things out if you have an idea. I put the code for the Paypal Button and container in the post above so maybe that will help. Let me know. Thanks.
make the .container CSS in your code more specific,
i.e. change from:
.container { }
to:
#innerbox .container { }
so it will only get applied to the container in the shortcode;What a fix! That worked GREAT! Thank you! I have been working on that for weeks.
The only issue I have now is that on the MOBILE version the payment box is still there and it kinda blocks the page. Please check it out and let me know what you think.
I would like to replace it with a simplified Paypal button if possible when the screen size changes to a cell phone. Here is the code I would like to use.
<div class="ppcontainer2"> <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> <input type="hidden" name="cmd" value="_xclick"> <input type="hidden" name="business" value="2ZF8FQ9RWU4ZS"> <input type="hidden" name="lc" value="US"> <input type="hidden" name="item_name" value="The Socket Roll"> <input type="hidden" name="amount" value="34.99"> <input type="hidden" name="currency_code" value="USD"> <input type="hidden" name="button_subtype" value="services"> <input type="hidden" name="no_note" value="0"> <input type="hidden" name="cn" value="Add special instructions to the seller:"> <input type="hidden" name="no_shipping" value="2"> <input type="hidden" name="weight_unit" value="lbs"> <div id="position"> <label for="qty">Qty.</label> <input type="text" name="quantity" id="qty" size="3" value="1" required> <!-- Button Images --> <div id="ppImage"> <input type="image" src="https://www.paypalobjects.com/webstatic/en_US/i/buttons/buy-logo-medium.png" border="0" name="submit" alt="Buy now with PayPal!"> </div> </div> <div id="accepted"> <input type="image" src=" https://openmerchantaccount.com/img/accepted_payment200x25px.png" alt="Accepted Payment Methods" /> </div> <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </form> </div> <style> .ppcontainer2 { width: 200px; } #position { width: 170px; margin: auto; } #ppImage { padding-top: 20px; } #accepted { padding-top: 3px; } #qty { -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 3px; </style>
What do you think?
Anyone…
Hi,
The content that you add in page is not responsive.
Please create your content with general HTML tags like p, table etc.
Your PayPal box is fixed everywhere. That’s why it floating in every device.
Please make it fixed, static as per device.
Let us know for further assistance.
Thanks.
I usd this website (https://www.togotutor.com/code-to-html/java-to-html.php) to translate it to HTML. Will this work and where would I put this code if I want it on the “Products” page?
<div style='background:#FFFFFF; font-family: Courier New, Courier; font-size: 10pt; COLOR: #000000; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;'><script src=<font color='#2a00ff'>"https:<font color='#3f7f5f'>//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> </font><br/> <br/> <br/> <br/><div id=<font color='#2a00ff'>"box"</font>> <br/> <br/> <div id=<font color='#2a00ff'>"innerbox"</font>> <br/> <br/> <div id=<font color='#2a00ff'>"headerbox"</font>> <br/> <br/> <h4 id=<font color='#2a00ff'>"price"</font>><span id=<font color='#2a00ff'>"pricestyle"</font>>price:</span>$29.99</h4> <br/> <br/> <h6 id=<font color='#2a00ff'>"Alternate"</font>>*If shipping outside the Continental US different shipping charges apply. Total price will be calculated on checkout page.</h5> <br/> <br/> </div> <br/> <br/> <div <strong><font color='#7f0055'>class</font></strong>=<font color='#2a00ff'>"container"</font>> <br/> <br/> <form action=<font color='#2a00ff'>"https:<font color='#3f7f5f'>//www.paypal.com/cgi-bin/webscr" method="post" target="_top"> </font><br/> <br/> <input type=<font color='#2a00ff'>"hidden"</font> name=<font color='#2a00ff'>"cmd"</font> value=<font color='#2a00ff'>"_xclick"</font>> <br/> <br/> <input type=<font color='#2a00ff'>"hidden"</font> name=<font color='#2a00ff'>"business"</font> value=<font color='#2a00ff'>"2ZF8FQ9RWU4ZS"</font>> <br/> <br/> <input type=<font color='#2a00ff'>"hidden"</font> name=<font color='#2a00ff'>"lc"</font> value=<font color='#2a00ff'>"US"</font>> <br/> <br/> <input type=<font color='#2a00ff'>"hidden"</font> name=<font color='#2a00ff'>"item_name"</font> value=<font color='#2a00ff'>"The Socket Roll"</font>> <br/> <br/> <input type=<font color='#2a00ff'>"hidden"</font> name=<font color='#2a00ff'>"amount"</font> value=<font color='#2a00ff'>"34.99"</font>> <br/> <br/> <input type=<font color='#2a00ff'>"hidden"</font> name=<font color='#2a00ff'>"currency_code"</font> value=<font color='#2a00ff'>"USD"</font>> <br/> <br/> <input type=<font color='#2a00ff'>"hidden"</font> name=<font color='#2a00ff'>"button_subtype"</font> value=<font color='#2a00ff'>"services"</font>> <br/> <br/> <input type=<font color='#2a00ff'>"hidden"</font> name=<font color='#2a00ff'>"no_note"</font> value=<font color='#2a00ff'>"0"</font>> <br/> <br/> <input type=<font color='#2a00ff'>"hidden"</font> name=<font color='#2a00ff'>"cn"</font> value=<font color='#2a00ff'>"Add special instructions to the seller:"</font>> <br/> <br/> <input type=<font color='#2a00ff'>"hidden"</font> name=<font color='#2a00ff'>"no_shipping"</font> value=<font color='#2a00ff'>"2"</font>> <br/> <br/> <input type=<font color='#2a00ff'>"hidden"</font> name=<font color='#2a00ff'>"weight_unit"</font> value=<font color='#2a00ff'>"lbs"</font>> <br/> <br/> <div id=<font color='#2a00ff'>"position"</font>> <br/> <br/> <label <strong><font color='#7f0055'>for</font></strong>=<font color='#2a00ff'>"qty"</font>>Qty.</label> <br/> <br/> <input type=<font color='#2a00ff'>"text"</font> name=<font color='#2a00ff'>"quantity"</font> id=<font color='#2a00ff'>"qty"</font> size=<font color='#2a00ff'>"3"</font> value=<font color='#2a00ff'>"1"</font> required> <br/> <br/> <br/> <br/> <br/> <br/> <!-- Button Images --> <br/> <br/> <div id=<font color='#2a00ff'>"ppImage"</font>> <br/> <br/> <input type=<font color='#2a00ff'>"image"</font> src=<font color='#2a00ff'>"https:<font color='#3f7f5f'>//www.paypalobjects.com/webstatic/en_US/i/buttons/buy-logo-medium.png" border="0" name="submit" alt="Buy now with PayPal!"> </font><br/> <br/> </div> <br/> <br/> </div> <br/> <br/> <div id=<font color='#2a00ff'>"accepted"</font>> <br/> <br/> <input type=<font color='#2a00ff'>"image"</font> src=<font color='#2a00ff'>" https:<font color='#3f7f5f'>//openmerchantaccount.com/img/accepted_payment200x25px.png" alt="Accepted Payment Methods" /> </font><br/> <br/> </div> <br/> <br/> <br/> <br/> <img alt=<font color='#2a00ff'>""</font> border=<font color='#2a00ff'>"0"</font> src=<font color='#2a00ff'>"https:<font color='#3f7f5f'>//www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1"> </font><br/> <br/> <br/> <br/> </form> <br/> <br/> </div> <br/> <br/> </div> <br/> <br/> <div <strong><font color='#7f0055'>class</font></strong>=<font color='#2a00ff'>"moreShipping"</font>> <br/> <br/> <ul <strong><font color='#7f0055'>class</font></strong>=<font color='#2a00ff'>"no-js"</font>> <br/> <br/> <li> <br/> <br/> <ul> <br/> <br/> <li>Alaska</li> <br/> <br/> <li>Hawaii</li> <br/> <br/> <li>Puerto Rico</li> <br/> <br/> <li>U.S. Virgin Islands</li> <br/> <br/> <li>- $9.95</li></br> <br/> <br/> <li>Canada and International</li> <br/> <br/> <li>- $29.95</li></br> <br/> <br/> </ul> <br/> <br/> </li> <br/> <br/> </ul> <br/> <br/> </div> <br/> <br/> <!--<p>+ Additional Shipping Costs</p>--> <br/> <br/></div> <br/> <br/> <br/> <br/><style> <br/> <br/>#box { <br/> <br/> top: 240px; <br/> <br/> right: 120px; <br/> <br/> width: 250px; <br/> <br/> border-radius: 10px; <br/> <br/> box-shadow: -3px 2px 8px rgba(77, 77, 77, 0.5); <br/> <br/> background-color: rgb(255, 255, 255); <br/> <br/> position: fixed; <br/> <br/>} <br/> <br/>#innerbox { <br/> <br/> width: 100%; <br/> <br/> height: 100%; <br/> <br/> position: relative; <br/> <br/>} <br/> <br/>#headerbox { <br/> <br/> background-color: rgb(245, 245, 245); <br/> <br/> border-radius: 10px 10px 0px 0px; <br/> <br/> border-bottom: 1px solid rgb(162, 162, 162); <br/> <br/>} <br/> <br/>#pricestyle { <br/> <br/> font-weight: 300; <br/> <br/> font-size: 13px; <br/> <br/> margin-right: 8px; <br/> <br/> color: rgb(107, 107, 107) <br/> <br/>} <br/> <br/>#price { <br/> <br/> width: 130px; <br/> <br/> padding-top: 10px; <br/> <br/> padding-bottom: 4px; <br/> <br/> margin: auto; <br/> <br/>} <br/> <br/>#plus { <br/> <br/> font-weight: 700; <br/> <br/> color: rgb(43, 43, 43) <br/> <br/>} <br/> <br/>#shipstyle { <br/> <br/> font-weight: 300; <br/> <br/> font-size:13px; <br/> <br/> margin-right: 8px; <br/> <br/> color: rgb(107, 107, 107) <br/> <br/>} <br/> <br/>#shipping { <br/> <br/> width: 130px; <br/> <br/> padding-bottom: 4px; <br/> <br/> border-bottom: 1px solid rgb(152, 152, 152); <br/> <br/> margin: auto; <br/> <br/>} <br/> <br/>h2,h4 { <br/> <br/> margin: 0px; <br/> <br/> text-align: center; <br/> <br/> font-family: <font color='#2a00ff'>"Open Sans"</font>,sans-serif; <br/> <br/>} <br/> <br/>h2 span { <br/> <br/> font-size: 13px; <br/> <br/> margin-right: 8px; <br/> <br/> font-weight: 300; <br/> <br/> color: rgb(107, 107, 107); <br/> <br/>} <br/> <br/>#total { <br/> <br/> padding: 2px 0px 6px 0px; <br/> <br/>} <br/> <br/>#tax { <br/> <br/> font-style: italic; <br/> <br/> color: rgb(0, 0, 0); <br/> <br/>} <br/> <br/>#innerbox .container { <br/> <br/> width: 200px; <br/> <br/> height: 103px; <br/> <br/> margin: auto; <br/> <br/> padding:25px 0px; <br/> <br/>} <br/> <br/>h6 { <br/> <br/> margin: 0px; <br/> <br/> text-align: center; <br/> <br/> padding-top: 15px; <br/> <br/> padding-right: 20px; <br/> <br/> padding-bottom: 20px; <br/> <br/> padding-left: 20px; <br/> <br/> font-family: <font color='#2a00ff'>"Open Sans"</font>,sans-serif; <br/> <br/> font-weight: 400; <br/> <br/> color: rgb(107, 107, 107); <br/> <br/>} <br/> <br/>#position { <br/> <br/> width: 170px; <br/> <br/> margin: auto; <br/> <br/>} <br/> <br/>#qty { <br/> <br/> -webkit-border-radius: 5px; <br/> <br/> -moz-border-radius: 5px; <br/> <br/> border-radius: 3px; <br/> <br/>} <br/> <br/>#ppImage { <br/> <br/>padding-top: 20px; <br/> <br/>} <br/> <br/>#accepted { <br/> <br/> padding-top: 3px; <br/> <br/>} <br/> <br/>.moreShipping { <br/> <br/> margin-left:0px; <br/> <br/> font-family:<font color='#2a00ff'>"Open Sans"</font>,sans-serif; <br/> <br/> font-size: 13px; <br/> <br/> position: relative; <br/> <br/> color: rgb(56, 57, 134); <br/> <br/> padding-top: 0px; <br/> <br/> <br/> <br/>} <br/> <br/>.moreShipping ul { <br/> <br/> position: absolute; <br/> <br/> padding-left: 0px; <br/> <br/> margin-left: 0px; <br/> <br/> font-weight:600; <br/> <br/> <br/> <br/>} <br/> <br/>.moreShipping ul li ul { <br/> <br/> position:relative; <br/> <br/> padding-top: 20px; <br/> <br/> background-color: rgb(245, 245, 245); <br/> <br/> border-radius:0px 0px 10px 10px; <br/> <br/> border: 1px solid rgba(187, 185, 185, 0.89); <br/> <br/> box-shadow: -5px 7px 8px rgba(107, 104, 104, 0.27); <br/> <br/> left:0; <br/> <br/> right:0; <br/> <br/>} <br/> <br/>.moreShipping ul li ul li { <br/> <br/> padding-top: 0px; <br/> <br/> padding-bottom: 2px; <br/> <br/> background: transparent; <br/> <br/>} <br/> <br/>.moreShipping ul .clicker { <br/> <br/> position:relative; <br/> <br/> rgb(0, 0, 0); <br/> <br/>} <br/> <br/>.moreShipping ul .clicker:hover,.moreShipping ul .active{ <br/> <br/> color: rgb(56, 57, 134); <br/> <br/>} <br/> <br/>.moreShipping ul li { <br/> <br/> margin-left: 0px; <br/> <br/> cursor:pointer; <br/> <br/> transition:background-color 0.2s ease-in-out; <br/> <br/> -webkit-transition:background-color 0.2s ease-in-out; <br/> <br/> -moz-transition:background-color 0.2s ease-in-out; <br/> <br/> display:block; <br/> <br/> padding:8px 10px 8px 40px; <br/> <br/> background:#FFF; <br/> <br/> color:#333; <br/> <br/> text-decoration:none; <br/> <br/>} <br/> <br/>.moreShipping ul li :hover { <br/> <br/> background:#F2F2F2; <br/> <br/>} <br/> <br/> <br/> <br/><font color='#3f7f5f'>/* Fallbacks */</font> <br/> <br/>.moreShipping .no-js ul {display:none;} <br/> <br/>.moreShipping .no-js:hover ul {display:block;} <br/> <br/> <br/> <br/> <br/> <br/></style> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/> <br/><script> <br/> <br/>$(function () { <br/> <br/> $(<font color='#2a00ff'>'.moreShipping > ul'</font>).toggleClass(<font color='#2a00ff'>'no-js js'</font>); <br/> <br/> $(<font color='#2a00ff'>'.moreShipping .js ul'</font>).hide(); <br/> <br/> $(<font color='#2a00ff'>'.moreShipping .js'</font>).click(function(e) { <br/> <br/> $(<font color='#2a00ff'>'.moreShipping .js ul'</font>).slideToggle(200); <br/> <br/> $(<font color='#2a00ff'>'.clicker'</font>).toggleClass(<font color='#2a00ff'>'active'</font>); <br/> <br/> e.stopPropagation(); <br/> <br/> }); <br/> <br/> $(document).click(function() { <br/> <br/> <strong><font color='#7f0055'>if</font></strong> ($(<font color='#2a00ff'>'.moreShipping .js ul'</font>).is(<font color='#2a00ff'>':visible'</font>)) { <br/> <br/> $(<font color='#2a00ff'>'.moreShipping .js ul'</font>, <strong><font color='#7f0055'>this</font></strong>).slideUp(); <br/> <br/> $(<font color='#2a00ff'>'.clicker'</font>).removeClass(<font color='#2a00ff'>'active'</font>); <br/> <br/> } <br/> <br/> }); <br/> <br/>}); <br/> <br/></script><div style='text-align:right;BORDER-TOP: #ccc 1px dashed'><a href="https://www.togotutor.com/code-to-html/java-to-html.php" target="_blank">Code Formatted by ToGoTutor</a></div></div>
Hi,
HTML code are not up-to mark for responsiveness.
Please use plugin for your requirement.
Thanks.
Can you recommend a plug-iin that works with your theme please?
- The topic ‘Why does this shortcode mess up my page’ is closed to new replies.