Semantic menu alignment?
I am developing a website using semantics. I want to place a menu bar at the top of a website. I tried the below code. But it doesn't put my menu bar at the top. I can see some space above and on the left. I do not want it. Can anyone help me fix this problem?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>php userlogin tutorial</title>
<link rel="stylesheet" href="css/semantic.min.css">
<link rel="stylesheet" href="css/tab.min.css">
<script src="js/jquery.js"></script>
<script src="js/semantic.min.js"></script>
<script src="js/tab.min.js"></script>
</head>
<body>
<nav class="ui menu">
<a class="active green item">
<i class="home icon"></i>Home
</a>
<a class="red item">
<i class="user icon"></i> About us
</a>
<a class="blue item">
<i class="photo icon"></i> Gallery
</a>
</nav>
</body>
</html>
+3
source to share
2 answers
Not sure if this was available back then, but now (I'm using version 2.1.8 now and I'm not sure when it was added) you can use
<div class="ui top fixed menu">
...
</div>
No need to customize css
http://semantic-ui.com/collections/menu.html#fixed
+3
source to share