Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Bug Reports
  3. top/bottom padding woocommerce not working

top/bottom padding woocommerce not working

Scheduled Pinned Locked Moved Bug Reports
8 Posts 2 Posters 61 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    ricorico4321
    wrote on last edited by
    #1

    Hi,
    I've been trying to adjust top/bottom padding for add to cart button for WooCommerce, but changes won't apply.
    Thanks

    1 Reply Last reply
    0
    • arminunruhA Offline
      arminunruhA Offline
      arminunruh
      Global Moderator
      wrote on last edited by
      #2

      link please ?
      Screenshot 2025-02-19 at 13.37.57.png

      for me it works

      1 Reply Last reply
      0
      • R Offline
        R Offline
        ricorico4321
        wrote on last edited by
        #3

        my bad!

        Capture d’écran 2025-02-19 à 14.35.53.png
        Capture d’écran 2025-02-19 à 14.36.02.png

        1 Reply Last reply
        0
        • arminunruhA Offline
          arminunruhA Offline
          arminunruh
          Global Moderator
          wrote on last edited by
          #4

          ah i understand now, i thought you meant a different setting

          so this setting does not affect "the add to cart button"

          but it does affect the buttons in checkout and cart: yourwebsite.com/cart/

          Screenshot 2025-02-19 at 14.54.08.png

          the reason for why the add to cart button has a fixed height thats not changeable is, because historically we only had these big inputs you can see below and i wanted the button to always have the same height as these inputs:

          Screenshot 2025-02-19 at 14.55.01.png

          do you want to change the button paddings for the element:
          +woocommerce → +add to cart button?

          if so use this css below.

          change height and line-height for changing the height.
          make sure line-height is 2px smaller than height.

          for changing space left and right, change padding-left and padding-right values.

          a.button.add_to_cart_button{
              height: 52px!important;
              line-height: 50px!!important
              padding-top: 0 !important;
              padding-bottom: 0 !important;
              padding-left: 10px!important;
              padding-right: 10px!important;
          }
          

          Enter this css in "lay options" -> "custom css & html" -> "custom css for desktop"
          or "css for mobile"

          1 Reply Last reply
          0
          • arminunruhA Offline
            arminunruhA Offline
            arminunruh
            Global Moderator
            wrote on last edited by
            #5

            for changing the add to cart button on the single product page use:

            .single-product .single_add_to_cart_button{
                height: 52px!important;
                line-height: 50px!!important
                padding-top: 0 !important;
                padding-bottom: 0 !important;
                padding-left: 10px!important;
                padding-right: 10px!important;
            }
            
            1 Reply Last reply
            0
            • arminunruhA Offline
              arminunruhA Offline
              arminunruh
              Global Moderator
              wrote on last edited by
              #6

              ok after reviewing this it seems that the padding top / bottom only applies to like 2 buttons

              so i will remove this setting

              i will introduce a new setting for the button height

              but the setting "padding left/right" seems to apply to every button

              1 Reply Last reply
              0
              • arminunruhA Offline
                arminunruhA Offline
                arminunruh
                Global Moderator
                wrote on last edited by arminunruh
                #7

                if u update lay theme now u will have this setting:
                Add to Cart Button Height (px)

                Screenshot 2025-02-19 at 16.41.01.png

                so you dont need to use the custom css i wrote

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  ricorico4321
                  wrote on last edited by
                  #8

                  thank you!

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  I also code custom websites or custom Lay features.
                  💿 Email me here: 💿
                  info@laytheme.com

                  Before you post:
                  1. When using a WordPress Cache plugin, disable it or clear your cache.
                  2. Update Lay Theme and all Lay Theme Addons
                  3. Disable all Plugins
                  4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

                  This often solves issues you might run into

                  When you post:
                  1. Post a link to where the problem is
                  2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
                  3. If the problem is difficult to explain, post screenshots / link to a video to explain it
                  Online Users
                  A
                  alasdair17
                  Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
                  laytheme.com
                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Search