CSS Header Assignment
CSS Header Assignment
DOCTYPE html>
<html lang="en">
<head>
<title>Page Title</title>
<meta charset="UTF-8">
<style>
*{
box-sizing: border-box;
body {
margin: 0;
/* Header/logo Title */
.header {
padding: 80px;
text-align: center;
background:crimson;
color: chartreuse;
.header h1 {
font-size: 40px;
}
/* Sticky navbar - toggles between relative and fixed, depending on the scroll position. It is
positioned relative until a given offset position is met in the viewport - then it "sticks" in place (like
position:fixed). The sticky value is not supported in IE or Edge 15 and earlier versions. However, for
these versions the navbar will inherit default position */
.navbar {
overflow: hidden;
background-color: darkblue;
position: sticky;
position: -webkit-sticky;
top: 0;
.navbar a {
float: left;
display: block;
color: burlywood;
text-align: center;
text-decoration: none;
/* Right-aligned link */
.navbar a.right {
float: right;
.navbar a:hover {
background-color: blue;
color: black;
}
/* Active/current link */
.navbar a.active {
background-color: #666;
color: white;
/* Column container */
.row {
display: flex;
flex-wrap: wrap;
/* Sidebar/left column */
.side {
flex: 30%;
background-color: #f1f1f1;
padding: 20px;
/* Main column */
.main {
flex: 70%;
background-color: white;
padding: 20px;
}
.fakeimg {
background-color: #aaa;
width: 100%;
padding: 20px;
/* Footer */
.footer {
padding: 20px;
text-align: center;
background: darkblue;
/* Responsive layout - when the screen is less than 700px wide, make the two columns stack on top
of each other instead of next to each other */
.row {
flex-direction: column;
/* Responsive layout - when the screen is less than 400px wide, make the navigation links stack on
top of each other instead of next to each other */
.navbar a {
float: none;
width: 100%;
}
</style>
</head>
<body>
<div class="header">
</div>
<div class="navbar">
</div>
<div class="row">
<div class="side">
</div>
<div class="main">
I am a person who is very optimistic about every aspect of life. I stay away from all sorts of
negativity.
I am a responsible person who can handle things very well especially when it comes to
multitasking.
I cannot call it a day until I have read something good. I like playing badminton with my dad in the
weekends.
I enjoy spending time with my friends and family. I enjoy travelling as well.
I usually like watching movies and series which have genres of mystery and comedy.
I also love being out in nature. It helps me feel relaxed and peaceful.</p>
<br>
<center><img src="C:\Users\piyub\OneDrive\Documents\christ-uni-1594812346.jpg"
width="500"></center>
</div>
</div>
<div class="footer">
</div>
</body>
</html>