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>&nbsp         </span>     </div>     <div align="right" style="position:relative;top:-41px;right:-50px">         <span>             <a class="loginhyperlink" href="../default.aspx">logout</a>&nbsp         </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.

fiddle

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>&nbsp     </span> </div> <div>     <span>         <a class="loginhyperlink" href="../default.aspx">logout</a>&nbsp     </span> </div> 

css

.loginhyperlink {     font-size: 1em;     text-decoration: underline;     cursor: pointer; } div {     float:right; } 

fiddle 2


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -