HTML CSS examples for CSS Widget:Menu
Two column layout with header menu
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> body {<!--from w ww .j a va2s. c om--> height: 100%; background-color: green; } header { margin-top: -8px; margin-left: -10px; padding: 10px; background-color: darkgrey; width: 100%; } #main-logo, #main-nav, #main-nav li { display: inline-block; margin-top: 0px; margin-bottom: 0px; } #main-logo, #main-nav li { border-radius: 5px; list-style-type: none; } #main-logo { background-color: forestgreen; margin-right: 30px; } #main-nav li { background-color: gold; margin-right: 10px; } #main-logo a, #main-nav li a { text-decoration: none; text-align: center; } #main-logo a { padding: 10px 20px; color: gold; } #main-nav li a { color: forestgreen; padding: 20px 40px; } .container { display: inline-block; width: 100%; min-height: 550px; } .left-panel, .right-panel { width: 40%; display: inline-block; margin-left: 3%; } .right-panel { margin-left:10%; } .left-panel .inner, .right-panel .inner{ border: 2px solid black; min-height: 300px; background-color: gold; } .current-day { width: 40%; margin-left: 2.5%; } </style> </head> <body> <div class="main-wrapper"> <header class="main-header"> <h1 id="main-logo"> <a href="#"> Food </a> </h1> <ul id="main-nav"> <li> <a href="#">H</a> </li> <li> <a href="#">N</a> </li> <li> <a href="#">O</a> </li> </ul> </header> <div class="container"> <br> <div class="left-panel"> <h2 id="left-header">Food Source</h2> <div class="inner"> <p> this is a test this is a test this is a test this is a test this is a test </p> </div> </div> <div class="right-panel"> <h2 id="right-header">Facts</h2> <div class="inner"> <p> this is a test this is a test this is a test this is a test this is a test this is a test this is a test this is a test </p> </div> </div> <div class="current-day"> <p> this is a test this is a test this is a test this is a test this is a test this is a test </p> </div> </div> </div> </body> </html>