центрирование div относительно друг друга
Два блока div с border в css. Должны быть рядом относительно друг друга на одинаковой высоте.
Как сделать?
И как сделать отступ между строками больше(в теге "a")?
Простите, я совсем-совсем начинающий
Приложил скрин и код.

.header {
font-family: "Consolas", "sans-serif";
font-size: 28px;
text-align: center;
background-color: rgb(150, 150, 150);
padding-top: 35px;
padding-bottom: 35px;
}
body{
background-color: gray;
}
.one{
border: 7px solid rgba(255, 145, 0, 0.8);
display: inline-block;
margin: 0 auto;
border-radius: 15px;
width: 350px;
height: 200px;
margin-top: 25px;
margin-left: 25px;
text-transform: uppercase;
padding: 10px;
}
.one p {
font-size: 26px;
text-align: center;
}
.two {
display: inline-block;
margin: 0 auto;
border: 7px solid rgba(255, 145, 0, 0.8);
border-radius: 15px;
width: 350px;
height: 200px;
}
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/style.css">
<title>Link</title>
</head>
<body>
<div class="header">
<h1><strong>Полезные ссылки для программистов</strong></h1>
</div>
<div class="one">
<p>Html</p>
<a href="//proglang.su/html-reference/tags">ProgLang - Все теги языка HTML(с описанием)</a>
<br>
<a href="//htmlreference.io">HTMLReference.io - Все теги языка HTML #2</a>
<br>
<a href="//validator.w3.org">W3School - Валидатор кода</a>
</div>
<div class="two">
<p>Css</p>
</div>
</body>
</html>
Ответы (2 шт):
Автор решения: ArturHarutyunyan
→ Ссылка
Самый простой способ
.header {
font-family: "Consolas", "sans-serif";
font-size: 28px;
text-align: center;
background-color: rgb(150, 150, 150);
padding-top: 35px;
padding-bottom: 35px;
}
body{
background-color: gray;
}
ul{
list-style: none;
}
li{
padding: 6px;
}
.one{
border: 7px solid rgba(255, 145, 0, 0.8);
border-radius: 15px;
width: 350px;
height: 200px;
margin-top: 25px;
text-transform: uppercase;
padding: 10px;
}
.one p {
font-size: 26px;
text-align: center;
}
.two {
border: 7px solid rgba(255, 145, 0, 0.8);
border-radius: 15px;
width: 350px;
height: 200px;
margin-top: 25px;
text-transform: uppercase;
padding: 10px;
}
.flex{
display: flex;
justify-content: center;
}
<div class="header">
<h1><strong>Полезные ссылки для программистов</strong></h1>
</div>
<div class="flex">
<div class="one">
<p>Html</p>
<ul>
<li>
<a href="//proglang.su/html-reference/tags">PROGLANG - ВСЕ ТЕГИ ЯЗЫКА</a>
</li>
<li>
<a href="//htmlreference.io">HTML(С ОПИСАНИЕМ)</a>
</li>
<li>
<a href="//validator.w3.org">W3School - Валидатор кода</a>
</li>
</ul>
</div>
<div class="two">
<p>Css</p>
</div>
</div>
Автор решения: Rachel
→ Ссылка
Самое простое решение - создать обёртку для двух дивов. Плюс немного оптимизировать css
.header {
font-family: "Consolas", "sans-serif";
font-size: 28px;
text-align: center;
background-color: rgb(150, 150, 150);
padding-top: 35px;
padding-bottom: 35px;
}
body{
background-color: gray;
}
.wrapper {
margin: 0 auto;
display: flex;
justify-content: center;
}
.one, .two {
border: 7px solid rgba(255, 145, 0, 0.8);
display: inline-block;
border-radius: 15px;
width: 350px;
height: 200px;
margin-top: 25px;
margin-left: 25px;
text-transform: uppercase;
padding: 10px;
}
.one p, .two p {
font-size: 26px;
text-align: center;
margin-bottom: 15px;
}
<div class="header">
<h1><strong>Полезные ссылки для программистов</strong></h1>
</div>
<div class="wrapper">
<div class="div one">
<p>Html</p>
<a href="//proglang.su/html-reference/tags">ProgLang - Все теги языка HTML(с описанием)</a>
<br>
<a href="//htmlreference.io">HTMLReference.io - Все теги языка HTML #2</a>
<br>
<a href="//validator.w3.org">W3School - Валидатор кода</a>
</div>
<div class="div two">
<p>Css</p>
</div>
</div>