Using Positions and Floating in CSS

HTML Code:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>working with layout</title>
<link href="csslayout.css" rel="stylesheet">
</head>

<body>

<header>
<img src="logo.png">
<h1>Jeevan IT Computer Education</h1>
<ul>
<li>About Us</li>
<li>SignIn</li>
<li>Register</li>
</ul>
</header>
<!-- header section close -->


<nav>
<ul>
<li>Home</li>
<li>About Us</li>
<li>Services</li>
<li>Career</li>
<li>Gallery</li>
<li>Contact</li>
</ul>
</nav>


<section></section>
<article></article>


<aside>
<h3>Using List</h3>
<hr>
<ul>
<li>Videos</li>
<li>Audios</li>
<li>Games</li>
<li>Results</li>
<li>Time Tables</li>
<li>Videos</li>
<li>Audios</li>
<li>Games</li>
<li>Results</li>
<li>Time Tables</li>
<li>Videos</li>
<li>Audios</li>
<li>Games</li>
<li>Results</li>
<li>Time Tables</li>
<li>More...</li>
</ul>
</aside>


<footer>
copyright@2017 www.jeevanit.com
</footer>


</body>

</html>


CSS Code: 

*{
border:0px;
padding:0px;
margin:0px;
}
body {
width:78%;
margin-left:auto;
margin-right:auto;
}
header {
width:100%;
height:70px;
background:#CCC;
position:relative;
}
header img {
width:60px;
position:absolute;
left:30px;
top:5px;
}
header h1 {
position:absolute;
left:100px;
top:25px;
font-size:16px;
font-family:"verdana";
}
header ul {
position:absolute;
right:50px;
top:25px;
}

header ul li {
float:left;
margin-right:50px;
list-style:none;
text-decoration:underline;
}

nav {
width:100%;
height:50px;
background:#666;
}
nav ul li {
float:left;
line-height:50px;
list-style:none;
padding:0px 50px;
color:#fff;
}
nav ul li:hover {
background:#F90;
}


section {
width:100%;
height:300px;
background:#FCF;
}
article {
width:80%;
height:600px;
background:#969;
float:left;
}

aside {
width:20%;
height:600px;
background:#C63;
float:right;
}
aside h3 {
text-align:center;
background:#06F;
line-height:30px;
}
aside ul  {

line-height:30px;
}
aside ul li {
border-bottom:1px #fff dotted;
list-style:none;
text-align:center;
}
aside ul li:hover {
background:#F66;
}

footer {
width:100%;
height:60px;
background:#0C9;
clear:both;
text-align:center;
line-height:60px;
}

Comments

Popular posts from this blog

Child Development and Pedagogy - MCQ-02

Child Development and Pedagogy - MCQ

Historical Evolution of Education in India and Acts and Rights in Indian Education