Image Links Surrounded By Background....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EmmaEliza
    New Member
    • Sep 2008
    • 4

    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....



    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)

    Code:
     
    #navigation {
    margin: 0;
    padding: 0;
    list-style-type: none;}
    
    #navigation li {
    margin-bottom: 2px;}
    
    #navigation a, a:link, a:active, a:visited {
    background: #ff99cc;
    color: #cc0066;
    display: block;
    border-bottom: 1px solid #cc0066;
    border-left: 5px solid #cc0066;
    border-right: 5px solid #cc0066;
    width: 208px;
    padding-left: 10px;
    text-align:left;}
    
    
    #navigation a:hover {
    background: #cc0066;
    color: #ff99cc;
    text-decoration: none;
    border-left: 5px solid #ff99cc;
    border-right: 5px solid #ff99cc;
    padding-left: 10px;
    }
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    try
    Code:
    #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

    Comment

    • EmmaEliza
      New Member
      • Sep 2008
      • 4

      #3
      Originally posted by Dormilich
      try
      Code:
      #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 ?

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        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
        Code:
        #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)
        Code:
        #bottomNavClose, #bottomNavClose:visited, #bottomNavClose:link, #bottomNavClose:active, #bottomNavClose:hover {
          /* your definitions here */
        }
        regards

        Comment

        • EmmaEliza
          New Member
          • Sep 2008
          • 4

          #5
          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 ?

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            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

            Comment

            Working...