CodeIgniter Forums
Using anchor within DIV - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Using anchor within DIV (/showthread.php?tid=17164)



Using anchor within DIV - El Forum - 03-27-2009

[eluser]PPhunky[/eluser]
Greetings good people of CI.

I am a newbie developing a small proof of concept website.

Is it possible to use the anchor helper within a DIV without displaying the link text?
I have some CSS buttons working using BG image and the anchor tag places the text of the URL in the DIV

Thanks In Advance
P.




Here is the code of the DIV
Code:
<div id="bd_signup">
            &lt;?=anchor('registration');?&gt;
            </div>


here is the CSS for that DIV


Code:
#bd_signup {
    display: block;
      width:160px;
      height:59px;
    position:absolute;
    left: 751px;
    top: 369px;
    background-image: url('../images/indexheaderSignUp.gif');
    background-repeat: no-repeat;
}


#bd_signup a {
    display: block;
    width: 100%;
      height: 100%;

}


#bd_signup:hover {
    display: block;
    background-image: url('../images/indexheaderSignUph.gif');
    background-repeat: no-repeat;
}



Using anchor within DIV - El Forum - 03-27-2009

[eluser]gvillavizar[/eluser]
[quote author="PPhunky" date="1238187792"]Greetings good people of CI.

I am a newbie developing a small proof of concept website.

Is it possible to use the anchor helper within a DIV without displaying the link text?
I have some CSS buttons working using BG image and the anchor tag places the text of the URL in the DIV

Thanks In Advance
P.




Here is the code of the DIV
Code:
<div id="bd_signup">
            &lt;?=anchor('registration');?&gt;
            </div>


here is the CSS for that DIV


Code:
#bd_signup {
    display: block;
      width:160px;
      height:59px;
    position:absolute;
    left: 751px;
    top: 369px;
    background-image: url('../images/indexheaderSignUp.gif');
    background-repeat: no-repeat;
}


#bd_signup a {
    display: block;
    width: 100%;
      height: 100%;

}


#bd_signup:hover {
    display: block;
    background-image: url('../images/indexheaderSignUph.gif');
    background-repeat: no-repeat;
}
[/quote]

If you want to hide the anchor text just add:

Code:
#bd_signup a {
    display: block;
    width: 100%;
    height: 100%;
    text-indent:-9999px;
}