Liquid, JavaScript, themes, sales channels
I have a custom section I made for a button called call-to-action in my Editions theme. The button mostly works but if I've clicked the button before the a, a:visited class turns my text blue.
How can I fix this? Section HTML and CSS for button section below.
<hr>
<div id="section-cta">
<div class="container">
<h3> {{ section.settings.text-box }} </h3>
<a href="{{ section.settings.link }}" class="button">{{ section.settings.linktext }}</a>
</div>
</div>
<hr>
{% schema %}
{
"name": "Call to action",
"settings": [
{
"id": "text-box",
"type": "text",
"label": "Heading",
"default": "Title"
},
{
"id": "link",
"type": "url",
"label": "Button link"
},
{
"id": "linktext",
"type": "text",
"label": "Button text",
"default": "Click here"
}
]
,
"presets": [
{
"name": "Call to Action",
"category": "Call To Action"
}
]
}
{% endschema %}
{% stylesheet %}
{% endstylesheet %}
{% javascript %}
{% endjavascript %}
//button for call-to-action section
.button {
font-family: Helvetica, "Helvetica Neue", Arial, "Lucida Grande", sans-serif;
display: inline-block;
padding: 0.85em 1.5em;
font-size: 1.5em;
cursor: pointer;
text-decoration: none;
color: #ffffff;
background-color: /*!setting.submit-button-color{*/#00a044/*}*/;
border: none;
border-radius: 0.62em;
background-color: /*!setting.submit-button-color{*/#00a044/*}*/;
}
.button:hover{
background-color: #018739;
color: #ffffff;
}
Please share the URL to your website.
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024