your problem is that tag ul
has rule padding-inline-start: 40px
by default. And that rule needs to be overridden. Add this to your css, and your problem will be solved:
.navigationwrap {
padding-inline-start: 0;
}
And do padding: 15px
for li a
:
li a {
text-decoration: none;
color: gray;
padding: 15px;
border-radius: 5px solid black;
}
Also, remove padding: 15px
from .Desktop
:
.Desktop {
background: gray;
color: white;
}
If you have any questions, let me know about them.
li {
display: inline;
}
li a {
text-decoration: none;
color: gray;
padding: 15px;
border-radius: 5px solid black;
}
.Desktop {
background: gray;
color: white;
}
.navigation {
background: white;
padding: 5px;
}
.text {
margin-left: 85px;
border: 2px solid black;
display: inline-block;
}
body {
background: gray;
}
.navigationwrap {
padding-inline-start: 0;
}
<!DOCTYPE html>
<html>
<head>
<title>KONECNE</title>
<link rel="stylesheet" href="CSS/styles.css">
<link rel="stylesheet" href="CSS/normalize.css">
</head>
<body>
<header id="header" class="hlavicka">
<nav id="nav" class="navigacka">
<div class="navigation">
<div class="text">
<ul class="navigationwrap">
<li><a href=# class="Desktop">Desktop</a></li>
<li><a href=# class="Tablet">Tablet</a></li>
<li><a href=# class="TabletP">Tablet(Potrait)</a></li>
<li><a href=# class="Mobile">Mobile</a></li>
</ul>
</div>
</div>
</nav>
</header>
<section id="header" class="wrapper">
<nav class="podnavigacka">
</nav>
</section>
<section class="hlavnytext">
</section>
</body>
</html>