简体   繁体   中英

Make my website logo adapt different resolutions

I'm currently building a website (wesurf.co.il) and I'm having some trouble with the logo part. Im trying to make the logo stay on the left side ( next to the central menu). while on 1920x1080 it looks good, in other resolution's the logo just blend with the menu or dissapearing. thanks for helping.

http://prntscr.com/l3zprs你可以像这样设置<a> </a><img/>

Try this code hope it will help :

<div style="display:flex; align-items: center; background:#888;">
  <div class="logo-img"> logo </div>
  <div class="menu" style="margin:auto;"> menu </div>
</div>

You can use this CSS. Also, you should use a SVG logo so it can scale on any device.

.logo-img {
    width: 100%;
}
#header .nav-main.boxed{
    max-width: 843px;
}
#header .logo {
    padding-top: 10px;
    padding-bottom: 10px;
    float: left;
    width: calc(100% - 873px);
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM