Tag Archive for "frontend" - Everet Dale

Posts Tagged ‘frontend’

Making really big things clickable

June 26th, 2013 | Tags: ,

I prefer to use straight HTML and CSS whenever possible, rather than using Javascript. This is mainly due to the fact that I am strong in HTML and CSS, and don’t have nearly as much experience in Javascript, but also because I follow the Keep It Simple Stupid philosophy. Having said that, sometimes I just want to make something really big a link. Lets say you wanted to make half of a webpage a link to another page. Sure you could wrap it all in an tag, but there is going to be cross browser issues. I’ve adopted this little of javascript for such situations. Its really just as simple as an HTML tag, and you can add it to any element:

 

<div onclick="window.location = 'http://www.everetdale.com/';">

</div>