Forum Moderators: not2easy
I would like to use a different background on links. This background should span the width of the column. background-color won't do it in Netscape 4, but using border:none and margin:0px should do the trick. There's only one problem: The links won't work any more (not clickable). Sample code:
<div style="position:absolut; left:0px; top:0px; width:200px;">
<a style="background-color:yellow; border:none; margin:0px" href="foo">short</a>
<a style="background-color:yellow; border:none; margin:0px" href="bar">very long link</a>
</div>
The next problem is even weirder: If using position:relative the link won't be clickable were it is displayed but instead if you point to the very left of the screen on that line, the link will be clickable. So there seems to be some offset problem.
<div style="position:relative; left:200px;"><a href="#foo">body link</a></div>
Using position:absolute would work. Is it just my NC or is this a known problem? And more important: Are there any work arounds that work in NC 4.7x?
PS: This is just sample code; the HTML and CSS code where I would like to use this does validate.
My workaround involved two external stylesheets and wrapping every anchor tag in a <p> tag:
<p class="link1"><a href="page.html" class="link2">Text</a></p>
In the Netscape 4 stylesheet, I declare the border for p.link1. On the main stylesheet, I declare the border for a.link2
One of the issues is that NN4 will not display a background for the full block of a block element unless there is a non-zero border declared (well documented bug). But when you do that for an anchor element the link goes dead. Using dual stylesheets gets around this, and other visual anomalies as well.
Maybe I'll give your workaround a try, tedster... never even thought of it!
I promised them a css solution which would retain the look of their current menu, forgetting at the time that they required NN4 support. So, before I totally ate crow I was highly motivated to find a way to make this work. Hence, this workaround.
And by the way SHAME ON NETSCAPE for ever releasing a browser with a bug this bad. Breaking link functionality with a common bit of code is insane - even going back 5 years. They had to know the bug was there, and it's not cosmetic - it breaks the very heart of the web, the hyperlink.