4
I have a container in my code and I need it to be clickable, with href
, let’s assume that by clicking it directs to "Google.com". How can I do this?
<div class="project-2 v-center">
<div><!--v-center-->
<div class="container">
<h1>COMPADRE IPSUM</h1>
<p>Eiiitaaa Mainhaaa!! Esse Lorem ipsum é só na brincadeira!!.</p>
</div>
<!--/.container-->
</div>
<!--/v-center-->
The class:
.container {
position: relative;
z-index: 2;
}
Can you better define what is clickable? If it’s the "little hand" cursor question, just add cursor: Pointer; in class . container
– carlosrafaelgn
Sorry, I need him to take a link with href and tals. Only I tried to put as put on buttons and etc but it was not. I don’t know if it has anything to do with class or if it’s a matter of writing anyway.
– Vinícius Terranova
The question then would be to "transform" the div into a link? Via javascript can be done:
<div class="container" onclick="window.location.href='http://google.com'">
– carlosrafaelgn