Я делаю простой сайт автосервиса, я только начал, и я несколько новичок, изучая и делая сайт в целом.
Одна главная страница, мне просто нужно сделать 2 вещи:
1. Меню
2. 2 кнопки (войти и зарегистрироваться)
Я уже сделал Меню и также сделал кнопки, но проблема в том, что я не могу отделить их друг от друга, и, возможно, мне нужно сделать что-то, чего я еще не знаю.
КОД:
/*CSS(Including Registration Form Which Shouldn't Be Needed Now):*/
body {
background-color: #00e673;
}
ul {
margin: 0px;
padding: 0px;
list-style: none;
z-index: 999;
}
ul li {
float: left;
width: 200px;
height: 40px;
background-color: black;
opacity: .8;
line-height: 40px;
text-align: center;
font-size: 20px;
margin-right: 2px;
z-index: 999;
}
ul li a {
text-decoration: none;
color: white;
display: block;
z-index: 999;
}
ul li a:hover {
background-color: green;
z-index: 999;
}
ul li ul li {
display: none;
z-index: 999;
}
ul li:hover ul li {
display: block;
z-index: 999;
}
.simple-form {
text-align: center;
margin: 100px 0px;
z-index: 10;
}
#registration {
width: 100%;
padding: 40px 0px;
z-index: 10;
}
#reg {
width: 250px;
padding: 10px;
border-radius: 5px;
outline: 0px;
z-index: 10;
}
#button {
width: 250px;
padding: 10px;
border-radius: 5px;
outline: 0px;
z-index: 10;
}
#ph {
width: 100px;
padding: 10px;
border-radius: 5px;
outline: 0px;
z-index: 10;
}
#phone {
width: 200px;
padding: 10px;
border-radius: 5px;
outline: 0px;
z-index: 10;
}
#rd {
color: white;
font-size: 18px;
z-index: 10;
}
#but {
color: white;
font-size: 18px;
z-index: 10;
}
#butt {
width: 250px;
padding: 10px;
border-radius: 5px;
outline: 0px;
z-index: 10;
}
input.MyLog {
width: 200px;
padding: 20px;
cursor: pointer;
font-weight: bold;
font-size: 150%;
background: #3366cc;
color: #fff;
border: 1px solid #3366cc;
border-radius: 10px;
}
input.MyReg {
width: 200px;
padding: 20px;
cursor: pointer;
font-weight: bold;
font-size: 150%;
background: #3366cc;
color: #fff;
border: 1px solid #3366cc;
border-radius: 10px;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Home</title>
<link href="style.css" rel="stylesheet" type="text/css">
<div>
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="services.html">Services</a>
<ul>
<li><a href="services/a-type.html">A Type</a></li>
<li><a href="services/b-type.html">B Type</a></li>
<li><a href="services/c-type.html">C Type</a></li>
<li><a href="services/d-type.html">D Type</a></li>
<li><a href="services/tech-check.html">Tech Check</a></li>
</ul>
</li>
<li><a href="registration.html">Registration</a>
<li><a href="contact.html">Contact</a></li>
<li><a href="profile.html">Profile</a></li>
</ul>
</div>
</head>
<body>
<div class="button">
<form id="myButtons">
<input class="MyLog" type="button" value="Login" onclick="location.href='profile.html'" />
<input class="MyReg" type="button" value="Register" onclick="location.href='registration.html'" />
</form>
</div>
</body>
</html>
Я искал, но, думаю, это довольно специфическая ошибка для меня и моего кода, и я не смог ничего сформулировать.
Вот вывод:
![enter image description here](https://i.stack.imgur.com/EBEsv.png)
Мне нужно как-то переместить эти ВХОД и РЕГИСТРАЦИЮ в центр страницы, не перемещаясь и не касаясь МЕНЮ.