Как запретить изображению в grid-элементе растягивать высоту?
Всем привет. Высота body 100 vh, поделил сетку, все вроде по канонам, но изображение справа получается больше (если так), появляется горизонтальная полоса прокрутки и изображение растягивается по высоте. А нужно чтобы ее не было и высота сетки была по высоте видимой области экрана.
* {
padding:0;
margin:0;
}
body {
font-family: "Segoe UI", sans-serif;
height: 100vh;
}
@font-face {
font-family: 'Segoe UI';
url('fonts/Segoe%20UI%20Semibold.ttf') format('truetype');
font-display: swap;
font-weight: bold;
font-style: normal;
}
.container {
display: grid;
grid-template-columns: repeat(10, 10%);
grid-template-rows: repeat(20, 5%);
height: 100%;
box-sizing: border-box;
}
.logo {
justify-self: start;
grid-column: 1 / 4;
grid-row: 1 / 5;
}
.logo img {
max-width: 100%;
height: auto;
}
.header {
justify-self: end;
align-self: center;
grid-column: 10 / 11;
grid-row: 1 / 4;
}
.gsi {
background-color: #1b8183;
grid-column: 1 / 6;
grid-row: 10 / 18;
}
.pillar {
grid-column: 6 / 11;
grid-row: 4 / 21;
}
.pillar img {
max-width: 100%;
height: auto;
}
/* Ссылка-текст */
.logo-text a:active, /* активная/посещенная ссылка */
.logo-text a:hover, /* при наведении */
.logo-text a {
text-decoration: none;
color: #1b8183;
font-size: 2vw;
font-weight: bold;
}
/* Гамбургер иконка */
.menu-btn {
width: 50px;
height: 50px;
position: relative;
z-index: 2;
overflow: hidden;
padding-top: 50px;
padding-right: 50px;
}
.menu-btn span {
width: 50px;
height: 4px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: #538b99;
border: 1px solid #538b99;
border-radius: 10px;
transition: all 0.5s;
}
.menu-btn span:nth-of-type(2) {
top: calc(40% - 5px);
}
.menu-btn span:nth-of-type(3) {
top: calc(60% + 5px);
}
/* Меняем гамбургер иконку, когда меню открыто */
.menu-btn.active span:nth-of-type(1) {
display: none;
}
.menu-btn.active span:nth-of-type(2) {
top: 50%;
transform: translate(-50%, 0%) rotate(45deg);
}
.menu-btn.active span:nth-of-type(3) {
top: 50%;
transform: translate(-50%, 0%) rotate(-45deg);
}
/* Меню, которое будет появляться */
.menu {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 15px;
background: #FFEFBA;
transform: translateX(-100%);
transition: transform 0.5s;
}
.menu.active {
transform: translateX(0);
}
.menu li {
list-style-type: none;
}
.button {
background-color: rgba(28, 28, 28, 0);
border: 1px solid #000;
border-radius: 15px;
color: black;
padding: 15px 32px;
text-align: center;
text-decoration: none;
font-size: 16px;
margin: 4px 2px;
cursor: pointer;
}
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=0">
<title>Сайт</title>
</head>
<body>
<div class="container">
<div class="logo"><a href="index.html"><img src="https://i.postimg.cc/bYD24JGb/logo.png" alt="логотип"></a></div>
<div class="header">
<div class="menu-btn">
<span></span>
<span></span>
<span></span>
</div>
</div>
<div class="menu">
<nav>
<ul>
<li><a href="#">Главная</a></li>
<li><a href="#">О нас</a></li>
<li><a href="#">Услуги</a></li>
<li><a href="#">Контакты</a></li>
</ul>
</nav>
</div>
<div class="gsi">Название —<br>Какой-то текст<br><input type="button" class="button" value="Написать"></div>
<div class="pillar"><img src="https://i.postimg.cc/7hxMnrVX/pillar.png" alt="Колонна"></div>
</div>
</body>
</html>
Хм, смотрю в здешнем редакторе все норм, но в браузере chrome не так. Браузер что-то от себя добавляет?

С уважением