css - Move sidebar under header -
it's been 2 days since started trying make work , swear can't see i'm doing wrong. html
<html> <head> <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=arvo"> <link rel="stylesheet" type="text/css" href="../css/main.css"> <meta charset="utf-8"> <title>home page</title> </head> <body> <div id="header"> home </div> <div id="sidebar"> <ul> <li>test</li> <li>test</li> <li>test</li> </ul> </body>
and css
* { margin:0; padding:0; } div#header { position:fixed; outline: none; text-align:center; font-family:'arvo', serif; color:white; font-size:48px; height:5%; width:100%; background-color: rgba(0,79,113,1); } div#sidebar { position:relative; bottom font-family:'arvo', serif; list-style-type: square; list-style-position: inside; color:white; height:100%; width:5%; background-color: rgba(100,147,167,1); } li{ font-family:'arvo', serif; }
i'm complete css noob(my code horrible) , want sidebar under header bar, , text in middle of sidebar aligned right. can help?
jsfiddle: https://jsfiddle.net/k5fflzoe/
try this: http://codepen.io/mattpark22/pen/xvxxwe
i've fixed missing closing tag, , updated css you.
html:
* { margin:0; padding:0; } div#header { outline: none; text-align:center; font-family:'arvo', serif; color:white; font-size:48px; height:5%; width:100%; background-color: rgba(0,79,113,1); } div#sidebar { float: right; text-align: center; font-family:'arvo', serif; list-style-type: square; list-style-position: inside; color:white; height:100%; width:5%; background-color: rgba(100,147,167,1); } li{ font-family:'arvo', serif; }
<html> <head> <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=arvo"> <link rel="stylesheet" type="text/css" href="../css/main.css"> <meta charset="utf-8"> <title>home page</title> </head> <body> <div id="header"> home </div> <div id="sidebar"> <ul> <li>test</li> <li>test</li> <li>test</li> </ul> </div> </body>
Comments
Post a Comment