Html background-size

1776 views html5

I have background image size 1920x200. In my browser i have different scale, so the width of my image in browser is more than 1920. To see the entire image i have to change the scale to 75%. But i am trying to make a size of my background image no bigger and no less than browser box with different scales. My code looks like

<nav class="navbar navbarlogo">
<div class="container">
    <div class="col-6">
        <h4> Sample text 1</h4>
        <h5> Sample text 2</h5>

.navbarlogo {
    height: 200px;
    background: url("../img/html-page-background-color-with-29-web-pics-s-at.png") no-repeat;

This code doesn't work exactly how i want. What's wrong?

answered question

1 Answer


How about closing the navbar?

<nav class="navbar navbarlogo"></nav>

and use


posted this

Have an answer?


Please login first before posting an answer.