Wednesday, December 12, 2018

Make a div / div tag a hyperlink or link

This tip is very helpful with today’s web where a lot of the graphic stuff such as drop shadows and gradients are being done through CSS.

<div onclick="location.href='newurl.html';">&nbsp;</div>

New Window:

<div onclick="window.open('newurl.html','mywindow');" style="cursor: pointer;">&nbsp;</div>

 

I hope this helps someone else out there….

 

0 Comments

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>