@Dunhil

Картинка кнопок съезжает. Как поставить куда мне нужно?

Есть блок, его бэкграунд картинка. Блок условно поделен на две равные части. Слева только фото. С правой заголовок текст и две кнопки. В предыдущих блоках прописывал код, так же все работало. Здесь кнопки убегающих не могу их разместить. Я новичок поэтому простите за кривой код
<!DOCTYPE html>
<html lang="en">
<head>
<title>BChat Website</title>
<meta charset="UTF-8">

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Manrope:wght@300;700&display=swap" rel="stylesheet">

<link rel="stylesheet" type="text/css" 
href="css/test.css">
</head>

<body>

<!--Last Page-->
<div class="last_page">
	<!--Бек-граунд-->
	<div class="last_page_bg">
		<img src="image/last page bg.png" width="1921" height="1080">
	</div>

	<!--Left Side-->
	<div class="last_page_left">
		<div class="last_page_left_img">
			<img src="image/last page left.png" width="542" height="830">
		</div>
	</div>
	
	<!--Right Side-->
	<div class="last_page_right">
		<div class="last_page_right_hp">
			For business
		</div>
		
		<div class="last_page_right_h">
			Business <br> Chat App
		</div>
		
		<div class="last_page_right_p">
			We strive to remain a safe and high-quality place <br> for our users, we consider each request <br> individually
		</div>
		
		
		<img src="image/last page ap.png" width="200" height="64" class="last_page_rigth_img_ap">
		

		
	</div>
</div>

</body>
</html>


.last_page{
	box-sizing: border-box;
	width:1921px;
	height:1080px;
}

.last_page_bg{
	position:relative;
}

/*
.last_page_left{
	box-sizing: border-box;
	width:50%;
	height:100%;
	float:left;
}
*/



.last_page_left_img{
	position: absolute;
	left: 281px;
	top: 187px;

}
/*
.last_page_right{
	box-sizing: border-box;
	width:50%;
	height:100%;
	float:right;
}
*/

.last_page_right_hp{
	position: absolute;
	left:1274px;
	top:304px;

	font-family: Manrope;
	font-style: normal;
	font-weight: 300;
	font-size: 14px;
	line-height: 170%;
	/* identical to box height, or 24px */

	letter-spacing: 0.03em;

	color: #071640;
}

.last_page_right_h{
	position: absolute;
	left:1270px;
	top:344px;

	font-family: Manrope;
	font-style: normal;
	font-weight: bold;
	font-size: 72px;
	line-height: 100%;
	/* or 72px */

	letter-spacing: -0.03em;

	color: #071640;
}

.last_page_right_p{
	position: absolute;
	left:1269px;
	top:533px;

	font-family: Manrope;
	font-style: normal;
	font-weight: 300;
	font-size: 16px;
	line-height: 170%;
	/* or 27px */

	letter-spacing: 0.03em;

	color: #071640;
}


.last_page_right_img_ap{
	position:absolute;

	padding-top:609px;
	margin-left:1296px;
}
  • Вопрос задан
  • 196 просмотров
Решения вопроса 1
@dev_f
У вас прописано абсолютное позиционирование для блоков, это не совсем верное решение.
Вам нужно создать main блок, внутри которого будет два блока last_page_left и last_page_right
Для родительского блока пропишите
display: flex;
flex-direction: row;
align-items: center;
Для двух внутренних пропишите width: 50%; и исключайте абсолютное позиционирование
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы