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?

https://www.ghostplugins.com/steps/hs83kjn7?fbclid=IwAR1D9F5poHzsqnwr31mzFdHljLx4nExFk76HgU82UfjvdhaEyVUZYcQWTGg

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

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

.sqs-block-button-element--small::before{
  width: 0%;
  height:100%;
  z-index: 3;
  content:'';
  position: absolute;
  bottom:-1px;
  left:0;
  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 281
  • 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

Archived

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.