SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Aug 29, 2002, 20:25 #1
- Join Date
- Aug 2002
- Posts
- 2
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
on a:link and its effects on <a href><img></a>
this is the code on my page:
<style type="text/css">
<!--
a { text-decoration: none}
a:link { border-bottom: dotted 1px #FFFFFF; color: #000000; }
a:visited { border-bottom: dotted 1px #FFFFFF; color: #000000; }
a:active { border-bottom: solid 1px #FFFFFF; color: #FFFFFF; }
a:hover { border-bottom: solid 1px #FFFFFF; color: #FFFFFF; }
-->
</style>
but i don't want to code to affect images with links. <a href><img></a> any ideas?
-
Aug 29, 2002, 20:46 #2
- Join Date
- Jan 2002
- Posts
- 420
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well, give the links with the image a separate class like
Code:<a href class="image"><img></a>
Code:a.image { border: none; }
Wavelan
-
Aug 29, 2002, 20:49 #3
- Join Date
- May 2002
- Location
- Melbourne, Australia
- Posts
- 299
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Try this:
Code:a.links { text-decoration:none; } a.links:visited { border-bottom:dotted 1px #fff; color:#000000; } a.links:active { border-bottom:solid 1px #fff; color:#fff; } a.links:hover { border-bottom:solid 1px #fff; color:#fff; }
Now for your link code, use:
Code:<a class="links" href="www.website.com">Link</a>
If you wanted to have different css properties for the img links, you could simply set a different class for them
Edit: Beat me to itLast edited by Wizardx8; Aug 29, 2002 at 20:52.
Bookmarks