Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old September 6th, 2008, 06:18 PM
Newbie
 
Join Date: Sep 2008
Posts: 4
Default 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. }  
Reply
  #2  
Old September 6th, 2008, 07:13 PM
Dormilich's Avatar
Expert
 
Join Date: Aug 2008
Location: Leipzig, Germany
Age: 31
Posts: 638
Default

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
Reply
  #3  
Old September 6th, 2008, 08:52 PM
Newbie
 
Join Date: Sep 2008
Posts: 4
Default

Quote:
Originally Posted by Dormilich
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 ?
Reply
  #4  
Old September 6th, 2008, 09:18 PM
Dormilich's Avatar
Expert
 
Join Date: Aug 2008
Location: Leipzig, Germany
Age: 31
Posts: 638
Default

Quote:
Originally Posted by EmmaEliza
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
Reply
  #5  
Old September 6th, 2008, 10:36 PM
Newbie
 
Join Date: Sep 2008
Posts: 4
Default

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 ?
Reply
  #6  
Old September 6th, 2008, 11:47 PM
Dormilich's Avatar
Expert
 
Join Date: Aug 2008
Location: Leipzig, Germany
Age: 31
Posts: 638
Default

Quote:
Originally Posted by EmmaEliza
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
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles