468,457 Members | 1,718 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,457 developers. It's quick & easy.

Image Links Surrounded By Background....

I have coded my css so that my text links have a background and border which I want to keep but I cant seem to edit the css so that my image links dont have the same thing....

http://www.teenagedq.forever-in-love.org/blends.php

If you click on the link that says leonardo dicaprio the java script will come up that shows the blend but the close button on the java script is surrounded by the same background and border as my text links... is there a code I need to put in my css to stop this happening ?

The navigation part of my css looks like this if it helps .... (the numbers are not a part of the css)

Expand|Select|Wrap|Line Numbers
  1.  
  2. #navigation {
  3. margin: 0;
  4. padding: 0;
  5. list-style-type: none;}
  6.  
  7. #navigation li {
  8. margin-bottom: 2px;}
  9.  
  10. #navigation a, a:link, a:active, a:visited {
  11. background: #ff99cc;
  12. color: #cc0066;
  13. display: block;
  14. border-bottom: 1px solid #cc0066;
  15. border-left: 5px solid #cc0066;
  16. border-right: 5px solid #cc0066;
  17. width: 208px;
  18. padding-left: 10px;
  19. text-align:left;}
  20.  
  21.  
  22. #navigation a:hover {
  23. background: #cc0066;
  24. color: #ff99cc;
  25. text-decoration: none;
  26. border-left: 5px solid #ff99cc;
  27. border-right: 5px solid #ff99cc;
  28. padding-left: 10px;
  29. }  
Sep 6 '08 #1
5 1774
Dormilich
8,651 Expert Mod 8TB
try
Expand|Select|Wrap|Line Numbers
  1. #navigation a, #navigation a:link, #navigation a:active, #navigation a:visited { /* line 9 */
you defined the style for all links with :link, :active, and :visited (not only the ones for navigation).

regards
Sep 6 '08 #2
try
Expand|Select|Wrap|Line Numbers
  1. #navigation a, #navigation a:link, #navigation a:active, #navigation a:visited { /* line 9 */
you defined the style for all links with :link, :active, and :visited (not only the ones for navigation).

regards

that takes the box away on the text links aswell...
is there any sort of code that makes a rule for images like the
a:link, a: active, a:visited like a a:img where you set the preferences for image links ?
Sep 6 '08 #3
Dormilich
8,651 Expert Mod 8TB
that takes the box away on the text links aswell...
is there any sort of code that makes a rule for images like the
a:link, a: active, a:visited like a a:img where you set the preferences for image links ?
two possibilities:
1) extend the style to the content div
Expand|Select|Wrap|Line Numbers
  1. #navigation a, #navigation a:link, #navigation a:active, #navigation a:visited, #content a, #content a:link, #content a:active, #content a:visited { /* line 9 */
2) or define the lightbox link like you want it to be (id of the anchor is bottomNavClose)
Expand|Select|Wrap|Line Numbers
  1. #bottomNavClose, #bottomNavClose:visited, #bottomNavClose:link, #bottomNavClose:active, #bottomNavClose:hover {
  2.   /* your definitions here */
  3. }
regards
Sep 6 '08 #4
I tried the 2nd one first as it looked easier and it worked I think or it just covered the pink thing up =], what do I do for it to work with other images ?
Sep 6 '08 #5
Dormilich
8,651 Expert Mod 8TB
what do I do for it to work with other images ?
shortly, the first option. to make it not too crowded apply it not to every id but to a class and attach the class everywhere you want the links styled in pink.

regards
Sep 6 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Chris Beall | last post: by
3 posts views Thread by Mark Tranchant | last post: by
15 posts views Thread by Applebrown | last post: by
3 posts views Thread by MediaDesign | last post: by
14 posts views Thread by D. Alvarado | last post: by
3 posts views Thread by Greg Heilers | last post: by
7 posts views Thread by Dan Nash | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.