Ecommerce Shopify WordPress Discussion

How do I make diffrent color links on the same page using css?

I don't know what CSS code I should use to make them and the only other one I could find had to do with Class1 and Class2 but I don't even know how to implement those onto the link. I'm also doing it from an icon list widget on WordPress if that helps. Thanks in advance if you know what I am doing wrong. I think it has something to do with not labeling the links in a way a.class1 {color:red;} a.class1:link {text-decoration: none; color: red;} a.class1:visited {text-decoration: none; color: red;} a.class1:hover {text-decoration: underline; color: red;} a.class1:active {text-decoration: none; color: red;} a.class2 {color:blue;} a.class2:link {text-decoration: none; color: blue;} a.class2:visited {text-decoration: none; color: blue;} a.class2:hover {text-decoration: underline; color: blue;} a.class2:active {text-decoration: none; color: blue;}
In WordPress, you can add custom CSS to your theme to achieve this. If you're using the default WordPress text widget, you can add your links like this: <a href="#" class="class1">Link 1</a> <a href="#" class="class2">Link 2</a> Replace "#" with the actual URLs. This way, your links will inherit the styles you defined for class1 and class2 in your CSS.

December 30, 2023

See this sample below, and use the div tag to call it it the body of your file. .city { background-color: tomato; color: white; border: 2px solid black; margin: 20px; padding: 20px; } </style> </head> <body> <div class="city"> <h2>London</h2> <p>London is the capital of England.</p> </div>

December 30, 2023

Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.