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?

enter image description here

<!DOCTYPE html>
<html lang="en">
<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>   
<nav class="ui menu">
    <a class="active green item">
        <i class="home icon"></i>Home
    <a class="red item">
        <i class="user icon"></i> About us
    <a class="blue item">
        <i class="photo icon"></i> Gallery



source to share

2 answers

Add custom CSS for this:

.menu-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;


And use the class in HTML:

<nav class="ui menu menu-top">





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">


No need to customize css



All Articles