Как мне это исправить?

Вот код:
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>FireFall Site!</title>
		<link rel="stylesheet" type="text/css" href="css_global.css">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="shortcut icon" href="/img/favicon.png" type="image/png">
		
		<!--Replain chat-->
		<script>
			window.replainSettings = { id: 'aaa7966a-d4b0-4946-8773-1a856aa1f504' };
			(function(u){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src=u;
				var x=document.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);
			})('https://widget.replain.cc/dist/client.js');
		</script>
		
		
		<style>

		/* width */
		::-webkit-scrollbar {
 		width: 10px;
		}

		/* Track */
		::-webkit-scrollbar-track {
		box-shadow: inset 0 0 5px grey; 
		border-radius: 5px;
		}
 
		/* Handle */
		::-webkit-scrollbar-thumb {
  		background: #0066cc; 
  		border-radius: 5px;
		}

		/* Handle on hover */
		::-webkit-scrollbar-thumb:hover {
  		background: #004080; 
		}
		
		html, body {
		height: 100%;
		}

		body {
		margin: 0;
		font-family: Franklin Gothic Medium,Franklin Gothic,ITC Franklin Gothic,Arial,sans-serif;
		background: linear-gradient(#36D1DC, #5B86E5) no-repeat;
		background-attachment: fixed;
		color: white;
		
		}

		.navbar {
		overflow: hidden;
		background-color: #333;
		position: fixed; /* Set the navbar to fixed position */
		width: 100%; /* Full width */
		}

		.navbar a {
		float: left;
		color: #f2f2f2;
		text-align: center;
		padding: 14px 16px;
		text-decoration: none;
		font-size: 17px;
		}

		.navbar a:hover {
		background-color: #ddd;
		color: black;
		}

		.navbar a.active {
		background-color: #4CAF50;
		color: white;
		}
		</style>
		
	</head>
	<body bgcolor="#45b0e5">

		<!--Top Navigation Bar-->
		<div class="navbar">
			<a href="/index.html" class="active">Домой</a>
			<a href="/pages/music.html">Моя музыка</a>
			<a href="/pages/games.html">Мои игры</a>
			<a href="/pages/news.html">Новости</a>
			<a href="/pages/projects.html">Мои проекты</a>
			<a href="/pages/contacts.html">Контакты</a>
		</div>

		<center><img src="/img/logo.png" style="margin-top: 50px;"></center>

	</body>
</html>


Вот вопрос:
Как сделать так, чтобы style="margin-top: 50px;(ну и всё остальное) отсчитывалось от меню, которое прикреплено к верху страницы?

Просто лень смотреть, когда лого не в меню застрял.
Спасибо.
  • Вопрос задан
  • 141 просмотр
Решения вопроса 1
wapster92
@wapster92 Куратор тега CSS
Вместо fixed sticky. И почитай статьи про поток элементов на странице.
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

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

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