css - Link my Logo to homepage html -
i want create logo in header clickable , link homepage don't know how right.
my code:
navigation menu:
html
<div id="mymenu"> <div class="mywrapper"> <nav> <div class="logo"></div> </nav> </div> </div>
css
#mymenu { width: 100%; height: 30px; z-index: 999; background-color: #252e30; } .mywrapper { max-width: 660px; margin: 0 auto; } .logo { display: inline-block; width: 156px; height: 30px; margin-top: 5px; background-size: auto 43px; background-image: url(../images/mylogo.png); background-repeat: no-repeat; }
i want logo create clickable , link page: homepage.cshtml
instead of using css set logo background image, wrong using img
tag, surrounding link? so:
<div id="mymenu"> <div class="mywrapper"> <nav> <a href="/"><img src="../images/mylogo.png" height="30" width="156" /></a> </nav> </div> </div>
this has added benefit of beingness more accessible (especially if utilize alt
attribute on logo), makes search engine bots happier. image content conveys meaning user should never bet set using css.
html css
No comments:
Post a Comment