+ 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
4 Antworten
+ 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 ;)
+ 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 {
....
}
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;
}
0
try creating an Id or class for the element , then style the class