-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab3-layout.html
More file actions
81 lines (76 loc) · 1.58 KB
/
Copy pathlab3-layout.html
File metadata and controls
81 lines (76 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en">
<head>
<title>CSS Template</title>
<meta charset="utf-8">
<style>
* {
box-sizing: border-box;
}
/* style the header */
header {
background-color: #667;
padding: 30 px;
text-align: center;
font-size: 35px;
color: white;
}
/* Create two columns/boxes that floats next to each other */
nav {
float: left;
width: 30%;
height: 300px; /*only for demo, should be removes */
background: #202;
padding: 20px;
color: white;
}
article {
float: left;
padding: 20px;
width: 70%;
background-color: #f1f1f1;
height: 300px;
}
section:after {
content: "";
display: table;
clear: both;
}
footer {
background-color: #667;
padding: 10px;
text-align: center;
color: white;
}
/*small screens*/
@media (max-width: 600px) {
nav, article {
width: 100%;
height: auto;
}
}
</style>
<head><title>Layouts</title></head>
<body>
<h2>CSS Layout Float</h2>
<p> In this example, we have created a header, two columns/boxes and a footer. On smaller screens, the columns will stack on top of each other. Resize the browser window to see the responsive effect (you will learn more about this in our next chapter - HTML Responsive.) </p>
<header>
<h2>College</h2>
</header>
<section>
<nav>
<ol>
<li><a href="#">CS</a></li>
<li><a href="#">EC</a></li>
<li><a href="#">ME</a></li>
</ol>
</nav>
<article>
<h1>VVCE</h1>
<p>VVCE is an engineering college affiliated to the VTU and recognised by the GOK and AICTE</p>
</article>
</section>
<footer>
<p>Footer</p>
</footer>
</body>