+ 1

Tried styling my links on the site with the css, but the same style appears for every other link I add, how can I stop this, I a

Link

5th Jun 2017, 12:26 AM
Falana Dolapo
Falana Dolapo - avatar
4 Réponses
+ 4
Depending of your needs, you can also set a class to the ancester element to a bunch of link: .anchors a { } or: .anchors>a { } ... first will target all decendants of type <a> from elements having class="anchors", second target all directs childs of type <a> from: study Css selectors possibilities, which are very powerfull since Css2 and now Css3 good support from most of browsers ;)
5th Jun 2017, 2:20 AM
visph
visph - avatar
+ 2
You can put a class in the link you want to style and style the class instead of the <a> tag: -- in html: <a class='anchor'>....</a> <a>...</a> -- in css: .anchor { .... }
5th Jun 2017, 12:35 AM
Ulisses Cruz
Ulisses Cruz - avatar
0
you can add either class for a link or id. so you can style specific links as you want. for example. html <a class="classname" href="#"></a> or <a id="uniqueidname" href="#"</a> css a.classname { text-decoration: none; } or #uniqueidname { text-decoration: none; }
5th Jun 2017, 4:52 AM
Emil Manafov
Emil Manafov - avatar
0
try creating an Id or class for the element , then style the class
4th Jul 2018, 10:06 AM
Chris
Chris - avatar