NameSilo

Html class problem

SpaceshipSpaceship
Watch
Look at the following two examples:

[A class="snip" href="site.com"]test1[/A]

[DIV class=snip]
[A href="site.com"]test2[/A]
[/DIV]


Please Note: <> was replaced with [] to show correctly in this message.

I am trying to get the hyperlink a specific color. In test1 it works correctly. But in test2 it does not work. Is it possible to get the hyperlink a specific color without changing the [A href="site.com"]test2[/A] line?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
If you wanted to keep the [A href] line, don't know. You can however, use JavaScript to act as the link, and then you could use your div tag.
 
0
•••
This changes text color:
HTML:
.snip {color:darkgreen;}

If you want to change the link color of a class, you need:
HTML:
.snip a {color: darkgreen;}
.snip a says is for the properties of the anchor tag contained in the snip class.
 
0
•••
or...

#snip a { color: darkgreen; }

and say [div id="snip"]
 
0
•••
HTML:
<span class="class"></span>

It's span, not div.
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Live Options
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back