html - Hyperlink behaves like label when adding second hyperlink -
i have issue html , css. below block of html. when have first (the login area), looks okay. add second first hyperlink (login) becomes not clickable. meaning cursor not change hand , can click on it, , behaves label.
html:
<div id="login" align="right" style="position:relative;top:-25px"> <span> <a class="loginhyperlink" href="../pages/login.aspx">login</a>  </span> </div> <div align="right" style="position:relative;top:-41px;right:-50px"> <span> <a class="loginhyperlink" href="../default.aspx">logout</a>  </span> </div> css:
.loginhyperlink { font-size: 1em; text-decoration: underline; cursor: pointer; color: #ffffcc; }
this occurring because second div on top. i've created fiddle show you, , added borders.
you need change positioning, or width. width going 100%.
in second fiddle, i've cleaned css bit. couple things. inline styling not great idea. if move styling css file, it'll easier replicate , edit later. also, using align= not good. should styling css. take @ new fiddle , tell me if need.
html
<div id="login"> <span> <a class="loginhyperlink" href="../pages/login.aspx">login</a>  </span> </div> <div> <span> <a class="loginhyperlink" href="../default.aspx">logout</a>  </span> </div> css
.loginhyperlink { font-size: 1em; text-decoration: underline; cursor: pointer; } div { float:right; }
Comments
Post a Comment