Custom Liquid - Remove black border inside square.

Solved

Custom Liquid - Remove black border inside square.

SamSukhoonNordl
Explorer
59 1 12

5c67a0ce8536e68f862380e2f5b3dc9c.png

As the title says I need help removing the black border inside the white border.

Code:

 

<style>
.video-cover { position: relative; }
.video-cover .cta-btn { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 999; }
video {
display: block;
margin: 0 auto;
width: 100%;
height: 50%;
}
 
@media screen and (max-width: 767px) {
video {
  display: none;
}
}
</style>
 
<!-- Video section will be hidden on mobile devices -->
<div class="video-cover">
<!-- Call to action button -->
<a class="cta-btn button" href="Add your site URL here">Products</a>
 
<video autoplay loop playsinline muted>
</video>
</div>
<style>
.video-cover .cta-btn {
 
  background-color: transparent;
 
  border: 2px solid white;
 
  color: white;
 
  padding: 10px 20px;
 
}
 
 
 
.video-cover .cta-btn:hover {
 
  background-color: black;
 
  border-color: black;
 
}
 
 
 
.video-cover .cta-btn-text {
 
  font-size: 18px;
 
  font-family: Arial, sans-serif;
 
  color: white;
 
}
 
 
 
.video-cover .cta-btn-text:hover {
 
  color: white;
 
}
 
```
 
 
 
And wrap your button text with a span element:
 
 
 
```
 
<a class="cta-btn button" href="Add your site URL here"><span class="cta-btn-text">Products</span></a>
 
```
 
 
 
This will make the button transparent with white outlines and text, and change the background to black on hover. The text font and color can be adjusted in the `.cta-btn-text` CSS rules.
 
 
 
To add text over the button, you can add another element, like a `span`, inside the button element:
 
 
 
```
 
<a class="cta-btn button" href="Add your site URL here">
 
  <span class="cta-btn-text">Products</span>
 
  <span class="btn-extra-text">Extra text</span>
 
</a>
 
```
 
 
 
And style it accordingly:
 
 
 
```
 
.video-cover .btn-extra-text {
 
  font-size: 14px;
 
  font-family: Arial, sans-serif;
 
  color: white;
 
  position: absolute;
 
  bottom: 10px;
 
}
</style>

 

Accepted Solution (1)

Made4uo-Ribe
Shopify Partner
10036 2385 3012

This is an accepted solution.

Hi @SamSukhoonNordl 

That was im trying to take out on your other post also taking out the double line when hover. 

  1. From you Admin page, go to Online Store > Themes
  1. Select the theme you want to edit
  2. Under the Asset folder, open the main.css(base.css, style.css or theme.css)
  3. Then place the code below at the very bottom of the file.

 

 

 

 

.cta-btn.button:after, .cta-btn.button:before {
    box-shadow: none !important;
}

 

 

 

 

  • And Save. 
  • Result:
  • Made4uoRibe_0-1719691282754.png

    Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.

View solution in original post

Replies 3 (3)

Made4uo-Ribe
Shopify Partner
10036 2385 3012

This is an accepted solution.

Hi @SamSukhoonNordl 

That was im trying to take out on your other post also taking out the double line when hover. 

  1. From you Admin page, go to Online Store > Themes
  1. Select the theme you want to edit
  2. Under the Asset folder, open the main.css(base.css, style.css or theme.css)
  3. Then place the code below at the very bottom of the file.

 

 

 

 

.cta-btn.button:after, .cta-btn.button:before {
    box-shadow: none !important;
}

 

 

 

 

  • And Save. 
  • Result:
  • Made4uoRibe_0-1719691282754.png

    Please don't forget to Like and Mark Solution to the post that helped you. Thanks!

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.
SamSukhoonNordl
Explorer
59 1 12

I couldn't be more thankful. I appericate it so much.

Made4uo-Ribe
Shopify Partner
10036 2385 3012

Welcome, please dont forget to likes. 😊 My notifications are delayed. I see your new post first before noticing your reply in the other post.

If this fixed your issue, Likes and Accept as Solution are highly appreciated. Coffee tips fuel my dedication.
Get experienced Shopify developers at affordable rates—visit Made4Uo.com for a quick quote!
Need THEME UPDATES but have custom codes? No worries, for an affordable price.