![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I'm displaying an image that is also a link against a black background. In Netscape 7.1, the current background color is displayed as a horizontal bar below the image. This allows :hover effects that change the background color to have a visible effect, as this bar changes color. By default, it appears that the color is inherited from the body color, i.e. with no link style applied, the bar is black, and invisible against the background. BUT, I want a different background color for TEXT links, so I specified something like: |
|
Testcase at http://pages.prodigy.net/chris_beall.../linktest.html Am I doing something wrong, or is Netscape 7.1? |
#3
| |||
| |||
|
|
"Chris Beall" <Chris_Beall (AT) prodigy (DOT) net> schreef in bericht news:fG8%a.449$F82.45 (AT) newssvr32 (DOT) news.prodigy.com... I'm displaying an image that is also a link against a black background. In Netscape 7.1, the current background color is displayed as a horizontal bar below the image. This allows :hover effects that change the background color to have a visible effect, as this bar changes color. By default, it appears that the color is inherited from the body color, i.e. with no link style applied, the bar is black, and invisible against the background. BUT, I want a different background color for TEXT links, so I specified something like: /snip/ Testcase at http://pages.prodigy.net/chris_beall.../linktest.html Am I doing something wrong, or is Netscape 7.1? I'm relatively new to this, so if I'm giving wrong info, anyone, please correct me: The problem is not the background of the image, I guess it's black. (I would have to check that with a transparant image :-)). The problem is the bar below the image, which is not the background of the image! You just have to get rid of that bar, this will solve your problem, right? So, have a read at http://devedge.netscape.com/viewsource/2002/img-table/ and notice, that adding display: block to your images, works outside tables as well :-) In your example code: A:link IMG { display: block; background-color: black ; border-style: none ; } A:visited IMG { display: block; background-color: black ; border-style: none ; } |
#4
| |||
| |||
|
|
"Els" <els.aNOSPAMPLEASE (AT) tiscali (DOT) nl.invalid> wrote in message news:bhjf5s$rm$1 (AT) reader1 (DOT) tiscali.nl... "Chris Beall" <Chris_Beall (AT) prodigy (DOT) net> schreef in bericht news:fG8%a.449$F82.45 (AT) newssvr32 (DOT) news.prodigy.com... Testcase at http://pages.prodigy.net/chris_beall.../linktest.html Am I doing something wrong, or is Netscape 7.1? I'm relatively new to this, so if I'm giving wrong info, anyone, please correct me: The problem is not the background of the image, I guess it's black. (I would have to check that with a transparant image :-)). The problem is the bar below the image, which is not the background of the image! You just have to get rid of that bar, this will solve your problem, right? So, have a read at http://devedge.netscape.com/viewsource/2002/img-table/ and notice, that adding display: block to your images, works outside tables as well :-) In your example code: A:link IMG { display: block; background-color: black ; border-style: none ; } A:visited IMG { display: block; background-color: black ; border-style: none ; } Els, OK, I first tested this by adding: A IMG { display:block;} which is a little heavy-handed, but got rid of the bar, which, thanks to your reference, I now know is descender space on an inline object. BUT eliminating the descender space also eliminates the hover effect. |
#5
| |||
| |||
|
|
I'm displaying an image that is also a link against a black background. In Netscape 7.1, the current background color is displayed as a horizontal bar below the image. This allows :hover effects that change the background color to have a visible effect, as this bar changes color. By default, it appears that the color is inherited from the body color, i.e. with no link style applied, the bar is black, and invisible against the background. BUT, I want a different background color for TEXT links, so I specified something like: A:link { background-color: red ; } [Color chosen to illustrate problem...] On N 7.1 the expected red bar now appears below images, BUT I wanted that background color only for TEXT links, so I attempt to override the style above with: A IMG {background-color: black ; } which has no effect. I refine that to: A:link IMG {background-color: black ; } A:visited IMG {background-color: black ; } and that has no effect either. The bar is still red. All style blocks appear in the order shown above, i.e. the non-IMG blocks appear first. Testcase at http://pages.prodigy.net/chris_beall.../linktest.html Am I doing something wrong, or is Netscape 7.1? Chris Beall |
#6
| |||
| |||
|
|
Chris Beall wrote: I'm displaying an image that is also a link against a black background. In Netscape 7.1, the current background color is displayed as a horizontal bar below the image. This allows :hover effects that change the background color to have a visible effect, as this bar changes color. By default, it appears that the color is inherited from the body color, i.e. with no link style applied, the bar is black, and invisible against the background. BUT, I want a different background color for TEXT links, so I specified |
|
How about using classes to address each type of link? I played with it a little bit, see the attached link. You'll need to modify to fit your specific needs of course, but it should get the idea across. http://bellsouthpwp.net/m/a/macunni/sandbox/link.htm |
![]() |
| Thread Tools | |
| Display Modes | |
| |