Hello fellow web designers. I used Dreamweaver to place a rollover image on one of my web pages. It uses Javascript. When I looked at the code it had written, it includes the following null hyperlink on the image:

<a href="#"><img src="rochfest-logo.gif" onmouseover="stuff" onmouseout="more stuff"></a>

Is there any chance this null link could cause errors on some browsers? I have only tested the page on IE6. Thanks for any help.

Steven.

That isn't "null", it's a hyperlink to an anchor. In the abscene of any specific anchor, it will refer to the top of the document.

Please post your code within either the HTML,CODE or INLINECODE forum tags.

Absolutely true.

Also, the anchor link will have no detrimental effect to your Web page in any browser. You could probably save some overhead though by using CSS instead of JavaScript.

Thanks for the advice.

You could probably save some overhead though by using CSS instead of JavaScript.

Can I take this to mean that CSS allows the placement of swapable and roll over images? Wouldn't that require the use of Javascript event detectors (i.e. onmouseover) anyway?

Steven.

No, you can use the pseudoclass :hover to change the background image. i.e.

a {background-image: url(image1.jpg); }
a:hover {background-image: url(image2.jpg); }

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.