Как переместить предмет ссылки вверх по оси Y, html
Начал изучать Django, html и css, и уже столкнулся с проблемой: нужно переместить элементы ссылок на темный фон, на уровень с логотипом, попробовал с помощью всяких элементов позиционирования, но чет не вышло.
body {
background: #c2c2c2;
}
aside {
float: inline-start;
background: #2c2c2c;
padding: 2.5%;
height: 10vh;
/* color: #fff; */
}
aside img {
height: 10vh;
width: 33vh;
margin-top: -4.8vh;
margin-left: -9vh;
}
aside ul {
list-style: none;
}
aside ul li {
display: inline;
position: relative;
transition: transform .3s ease;
color: #fff;
display: inline-block;
margin-left: 50px;
padding-top: -10vh;
font-size: xx-large;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
aside ul li:hover, aside ul a:hover {
color: #7284e2;
text-decoration: none;
transform: scale(1.05);
}
{% load static %}
<!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="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="{% static 'main/css/main.css' %}">
<title>{% block title %}{% endblock %}</title>
</head>
<body>
<aside>
<img src="{% static 'main/img/logo2.png' %}" alt="Лого">
<span class="logo"></span>
<ul>
<a href="{% url 'home' %}" class="button"><li>Главная</li></a>
<a href="{% url 'order' %}" class="button"><li>Заказать</li></a>
<a href="{% url 'contacts' %}" class="button"><li>Контакты</li></a>
</ul>
<style>
a {
text-decoration: none;
}
</style>
</aside>
<main>
{% block content %}
{% endblock %}
</main>
</body>
</html>
Источник: Stack Overflow на русском