1

Goodday,

I'm currently working on a page where I want to have a div clickable.

Got this far:

<a href="http://coteax.me/">
 <div id ="rectangle">
   <div id="iconx"></div>
 <p class="rec-text"> Portal for projects</p>
 </div>
</a>

It works but the text is underlined with a purple line (Hypertext ?) How do I make it so that the purple line is gone and the text just clickable ?

Many thanks in advance!

krychuq
  • 335
  • 3
  • 9
  • 22
Unknown
  • 33
  • 5

3 Answers3

0

You can just remove the underline by CSS, Check the CSS part of the example.

Example from Link:

The HTML:

<div class="boxhead">
    <h2>
        <span class="thisPage">Current Page</span>
        <a href="myLink"><span class="otherPage">Different Page</span></a>
    </h2>
</div>

The CSS:

.boxhead .otherPage {
    color: #FFFFFF;
    text-decoration: none;
}
0

HTML

<div id="iconx">
...
</div>

CSS

#iconx {
 cursor : pointer;
}

JQUERY

$('body').find("#iconx").delegate("click", function() {
 location.href="http://coteax.me/"
})
Riku
  • 652
  • 1
  • 9
  • 24
0

Just Use text-decoration: none.

<a href="http://coteax.me/" style="text-decoration: none;"><div id ="rectangle"><div id="iconx"></div><p class="rec-text"> Portal for projects</p></div></a>

OR (Using External CSS)

a {
    text-decoration: none;
}
<a href="http://coteax.me/">
    <div id ="rectangle">
        <div id="iconx"></div>
        <p class="rec-text">Portal for projects</p>
    </div>
</a>
Super User
  • 9,448
  • 3
  • 31
  • 47