Skip to content

Commit 0d1c8c5

Browse files
committed
holy_grail
1 parent 6bc24ba commit 0d1c8c5

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

Holy Grail/index.css

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
body {
2+
margin: 0;
3+
display: flex;
4+
justify-content: space-between;
5+
min-height: 100vh;
6+
flex-direction: column;
7+
}
8+
9+
header,
10+
footer {
11+
color: aliceblue;
12+
text-align: center;
13+
background-color: black;
14+
padding: 20px 0px;
15+
}
16+
17+
.container {
18+
display: flex;
19+
flex: 1;
20+
align-items: stretch; /* Ensure children stretch to full height */
21+
justify-content: space-between;
22+
}
23+
24+
.left,
25+
.right {
26+
background-color: palevioletred;
27+
width: 200px;
28+
padding: 20px;
29+
display: flex; /* Ensure the content inside stretches */
30+
flex-direction: column; /* Stack content vertically */
31+
}
32+
33+
main {
34+
flex: 1; /* Allow the main content to take remaining space */
35+
background-color: lightgray; /* Optional: Add a background color to main */
36+
padding: 20px; /* Optional: Add padding to main */
37+
}
38+
39+
@media only screen and (max-width: 960px) {
40+
.container {
41+
flex-direction: column;
42+
}
43+
.container,
44+
.left,
45+
.right {
46+
width: 100%;
47+
justify-content: space-between;
48+
}
49+
}

Holy Grail/index.html

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<link rel="stylesheet" href="index.css" />
7+
<title>Holy Grail</title>
8+
</head>
9+
<body>
10+
<header>
11+
<h> Header</h>
12+
</header>
13+
<div class="container">
14+
<aside class="left">
15+
<h1>left</h1>
16+
<p>rohit is on left</p>
17+
</aside>
18+
<main>
19+
<h1>middle</h1>
20+
</main>
21+
<aside class="right">
22+
<h1>Right</h1>
23+
<p>rohit is on left</p>
24+
</aside>
25+
</div>
26+
<footer>Footer</footer>
27+
</body>
28+
</html>

0 commit comments

Comments
 (0)