Title: Button style
Last modified: November 27, 2023

---

# Button style

 *  Resolved [met45](https://wordpress.org/support/users/met45/)
 * (@met45)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/button-style-21/)
 * Hi,
   How can I change the button style with css?I copy this code in custom css
   filed, give btn-6 css class to button and not working 🙁
 *     ```wp-block-code
       .btn-6::before{
       left: 50%;
       top: 0;
       transition-duration: 0.4s;
       }
       .btn-6::after{
       left: 50%;
       bottom: 0;
       transition-duration: 0.4s;
       }
       .btn-6 span::before{
       left: 0;
       top: 50%;
       transition-duration: 0.4s;
       }
       .btn-6 span::after{
       right: 0;
       top: 50%;
       transition-duration: 0.4s;
       }
       .btn-6:hover::before, .btn-6:hover::after{
       left: 0;
       }
       .btn-6:hover span::before, .btn-6:hover span::after{
       top: 0;
       }
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Support [Robert](https://wordpress.org/support/users/robertnextendweb/)
 * (@robertnextendweb)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/button-style-21/#post-17232193)
 * Hi [@met45](https://wordpress.org/support/users/met45/)!
 * I am sorry, but we do not support custom coding. But about your code, 2 things
   to note:
    1. By default we hide all the before and after elements. So if you want to show
       these, you need to change the display to block with !important:
       .btn-6::before,.
       btn-6::after{ display:block!important; }
    2. Your code has lots of errors. It has no content:
       [https://css-tricks.com/almanac/selectors/a/after-and-before/](https://css-tricks.com/almanac/selectors/a/after-and-before/)
       so you aren’t actually displaying anything. Then I see top, left etc. values
       being used, but it doesn’t really make sense this way, but instead these should
       be used with absolute positioning. Additionally, you set styles for span elements
       as well, but there is no span element in the Button.
 * So overall, this code will not work like this, so I would recommend finding someone
   who can fix this code for you, and achieve what you need, or use our options 
   without custom coding.

Viewing 1 replies (of 1 total)

The topic ‘Button style’ is closed to new replies.

 * ![](https://ps.w.org/smart-slider-3/assets/icon.svg?rev=2307688)
 * [Smart Slider 3](https://wordpress.org/plugins/smart-slider-3/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-slider-3/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-slider-3/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-slider-3/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-slider-3/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-slider-3/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Robert](https://wordpress.org/support/users/robertnextendweb/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/button-style-21/#post-17232193)
 * Status: resolved