I have tryed most of advice on stackoverflow such as:
How can I resize an image dynamically with CSS as the browser width/height changes?
Image doesn't scale inside flexbox ....
but my logo image still doesn't scale (zoom out when I resize window) as browser window size:( Do I need another logo sizes and use source media tags?
Maybe Im just inattentive but what can cause a mistake ?
.m-page-header {
display: flex;
}
.m-page-header__wrapper {
margin: 0 auto;
}
.m-page-header__img-container {
width: 100%;
height: 100%;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
flex-direction: row;
}
.m-page-header img {
max-width: 100%;
height: auto;
display: block;
}
.main-content {
display: block;
background-image: url("https://image.ibb.co/hTboSm/1_HEADER_bg.jpg");
background-size: 100%;
background-repeat: no-repeat;
width: 100%;
height: 100%;
}
.main-content__wrapper {
max-width: 960px;
margin: 0 auto;
}
html,
body {
height: 100%;
}
body {
min-width: 960px;
}
.visually-hidden {
display: none;
}
<body>
<main class="main-content">
<div class="main-content__wrapper">
<header class="m-page-header">
<div class="m-page-header__wrapper">
<section class="m-page-header__img-container">
<h2 class="page-header__header-text visually-hidden">Game</h2>
<img src="https://image.ibb.co/cNjQ7m/1_HEADER_logo.png"
alt="Game">
</section>
</div>
</header>
</div>
</main>
</body>
I want keep logotype sizes relatively background image (when bg become smaller -> logotype become smaller too and it should not take place of all background size.