Jump to content

Custom Coding Button

Recommended Posts

Site URL: https://www.blushwild.com/new-home

I'm currently using a Ghost plugin to turn a button into an underline on hover.  I'd like to reverse the code, so it shows with an underline and turns into a button on hover.  Site is currently under dev.  Can anyone help?


.sqs-block-button-element--small {
  height: 60px;
  line-height: 60px;
  text-align: center;
  transition: 0.5s;
  padding: 0 20px;
  cursor: pointer;

.sqs-block-button-element--small:hover {
  background-color: transparent;
  border-color: transparent;
  color: #000000;
    transition-delay: .2s;

  width: 0%;
  z-index: 3;
  position: absolute;
  box-sizing: border-box;
  transition: .2s;


.sqs-block-button-element--small:hover::before {
  width: 100% !important;
  transition: .7s;

.sqs-block-button-element--small::before {
  border-bottom: 1px solid #000000;

Link to comment
  • Replies 1
  • Views 283
  • Created
  • Last Reply

Hi. Remove your code & add new code

/* Button underline to hover background */
a.sqs-block-button-element--small.sqs-block-button-element {
    background: transparent;
    color: black;
    position: relative;
a.sqs-block-button-element--small.sqs-block-button-element:after {
    content: "";
    background: black;
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 1px;
    left: 0;
    transition: all 0.5s;
a.sqs-block-button-element--small.sqs-block-button-element:hover:after {
    height: 100%;


Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment


This topic is now archived and is closed to further replies.

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.