Topic: Recommended way to style logo image in navbar for responsive result.
gcrossan pro asked 7 years ago
Kamil Paciepnik free answered 7 years ago
jbankster.web pro answered 7 years ago
Q. What is the recommended way to style an image such that it is responsive and scales within the size of the navbar?First make the image to the largest size you will need. When we make it responsive, it will scale down "nicely" in size as media breakpoints are encountered. If the image source is declared within the html markup: When specifying images within the html markup that you want to act responsively, "do not" declare width or height values within the image element. Instead... do the following. Adding the BS4 builtin "img-fluid" class to your img elements will make them responsive. Example:
<img src="my-navbar-image.png" class="img-fluid" alt="My responsive image.">
Cite:
http://v4-alpha.getbootstrap.com/content/images/
Josh
Kamil Paciepnik free answered 7 years ago
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- ForumUser: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No