Image Links Surrounded By Background.... | Newbie | | Join Date: Sep 2008
Posts: 4
| |
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) -
-
#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;
-
}
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,641
| | | re: Image Links Surrounded By Background....
try - #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
| | Newbie | | Join Date: Sep 2008
Posts: 4
| | | re: Image Links Surrounded By Background.... Quote:
Originally Posted by Dormilich try - #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 ?
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,641
| | | re: Image Links Surrounded By Background.... 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 - #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) - #bottomNavClose, #bottomNavClose:visited, #bottomNavClose:link, #bottomNavClose:active, #bottomNavClose:hover {
-
/* your definitions here */
-
}
regards
| | Newbie | | Join Date: Sep 2008
Posts: 4
| | | re: Image Links Surrounded By Background....
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 ?
|  | Moderator | | Join Date: Aug 2008 Location: Leipzig, Germany
Posts: 3,641
| | | re: Image Links Surrounded By Background.... 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
|  | | | | /bytes/about
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 226,358 network members.
|