html - IMG in <li> to dynamically scale down as the browser window and/or screen resolution is smaller? -
i have logo in navbar, want resize automatically screen sixe/resolution changes.
please see code below: tried img css, doesn't seem work.
img { max-width: 100%; height: auto; width: auto\9; /* ie8 */ } <ul class="s5_1"> <div> <li>img src="assets/img/logoonly.jpg"></li> </div> <br/> <br/> <br/> <br/> <br/> <ul style="float:right;list-style-type:none;"> <li><a class="active style2" href="index.html">home |</a></li> <li><a href="about.html"> | </a></li> <li><a href="vission.html"> vision | </a></li> <li class="dropdown"> <a href="#" class="dropbtn"> products | </a> <div class="dropdown-content"> <a href="products.html">products1</a> <a href="surface.html">products</a> </div> </li> <li><a href="contact.html">contact</a></li> </ul> </ul> </div>
thank you
your img tag not valid, try changing <li>img src="assets/img/logoonly.jpg"></li>
<li><img src="assets/img/logoonly.jpg"></li>
.
Comments
Post a Comment