ul { list-style-type: none; margin: 0; padding: 0; overflow: hidden; background-color: #333; position: fixed; top: 40px; width: 100%; } li { float: left; } li a { display: block; color: white; text-align: center; padding: 14px 16px; text-decoration: none; } /* Change the link color to #111 (black) on hover */ li a:hover { background-color: #111; } header{ background-image: linear-gradient(to right, red , yellow); position: fixed; top: 0px; width: 100%; height: 40px; } header h1{ margin:0px; } article{ margin-top:100px; margin-bottom: 30px; margin-left: 10px; margin-right: 10px; } footer{ position: fixed; bottom: 0; width: 100%; background-color: Green; } body{ margin: 0px; }