-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflex.html
More file actions
198 lines (180 loc) · 6.1 KB
/
flex.html
File metadata and controls
198 lines (180 loc) · 6.1 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!--
=========================================================
Name : index.html
Assignment : Lab 4 Exercise C
Author(s) : Mahdi Ansari, William Arthur Philip Louis
Name(s) : Zehra Zaidi, Tehreem Sajid
Submission : February 7th, 2024
Description : Flex Layouts.
=========================================================
-->
<!DOCTYPE html>
<html>
<head>
<title>Responsive Webpage Layout</title>
<!--
Ensure that your HTML file includes the viewport meta tag in the <head> section.
This tag is essential for responsive design as it tells the browser how to control the page's dimensions and scaling.
-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
/* CSS for menu. You don't need to touch this part */
.menu { background-color: #e6e6e6; }
.menu ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
}
.menu ul li {
padding: 5px 0;
}
.menu ul li a {
padding: 10px;
text-decoration: none;
color: #315eff;
}
</style>
<style>
* {
box-sizing: border-box;
}
body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
.container {
display: flex;
flex-direction: column;
}
.header, .footer { background-color: #f2f2f2; text-align: center; padding: 10px; width: 100%;}
.body {
display: flex;
flex-direction: row;
}
.main {
padding: 15px;
display: flex;
flex-direction: column;
flex: 1;
}
.news-item { padding: 10px; }
.row {
display: flex;
flex-wrap: wrap;
width: 100%;
}
@media screen and (min-width: 769px) {
.menu { width: 150px; }
.large {
width: 100%;
}
.medium {
width: 70%;
}
.small {
width: 30%;
}
}
@media screen and (max-width: 768px) {
.body {
display: flex;
flex-direction: column;
}
.menu {
display: flex;
flex-direction: column;
}
.menu ul {
display: flex;
flex-direction: row;
}
.small {
width: 40%;
}
.medium {
width: 60%;
}
.large {
width: 100%;
}
}
@media screen and (max-width: 480px) {
.news-item header h1 { font-size: 18px; }
.medium, .small {
width: 100%;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">Header</div>
<div class="body">
<div class="menu">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div class="main">
<div class="row">
<!-- Large news item -->
<div class="large news-item">
<header>
<h1>Revolutionary New Computer Changes the Tech World</h1>
</header>
<img src="images/large.jpg" alt="Large Image">
<article>
<h2>The Dawn of a New Era</h2>
<p>In a groundbreaking development, TechCorp has unveiled a computer with the ability to learn and adapt. This new technology, which the company has been developing in secret for years, promises to revolutionize the way we interact with machines.</p>
<h3>Unprecedented Capabilities</h3>
<p>Experts are astounded by the computer's capabilities, which include advanced artificial intelligence, unparalleled processing speed, and an intuitive user interface. "It's unlike anything we've ever seen," said a leading tech analyst.</p>
<h3>The Future is Here</h3>
<p>With this release, TechCorp not only sets a new standard in computing but also opens up a world of possibilities for future technology. The company plans to make this technology available to the public by the end of the year.</p>
</article>
</div>
</div>
<div class="row">
<!-- Small news item -->
<div class="small news-item">
<header>
<h1>Calgary's Natural Beauty Captivates Tourists</h1>
</header>
<img src="images/small.jpg" alt="Small Image">
<article>
<h2>Emerald Oasis in the Heart of the City</h2>
<p>Calgary, known for its vibrant city life, is now gaining fame for its lush green spaces and rich biodiversity. The city's parks and riversides have become a haven for nature lovers.</p>
<h3>Urban Wildlife Flourishes</h3>
<p>Recent reports indicate a rise in urban wildlife sightings, adding to the city's allure. Deer, coyotes, and various bird species are now common sights in Calgary's green spaces.</p>
<h3>A Green Transformation</h3>
<p>The transformation of the city into a green paradise has been praised by environmentalists, calling it a perfect blend of urban development and nature conservation.</p>
</article>
</div>
<!-- Medium news item -->
<div class="medium news-item">
<header>
<h1>Zehra and Tehreem Take a Historic Spacewalk Near the ISS</h1>
</header>
<img src="images/medium.jpg" alt="Medium Image">
<article>
<h2>A Historic Moment in Space Exploration</h2>
<p>In an unprecedented feat of human courage and technological prowess, astronaut Mahdi Ansari completed a spacewalk near the International Space Station (ISS), marking a new milestone in space exploration.</p>
<h3>A Breathtaking Journey</h3>
<p>Ansari, aboard the spacecraft Voyager X, ventured out into the void of space, capturing breathtaking views of Earth and conducting important research that could pave the way for future interstellar travel.</p>
<h3>Pushing the Boundaries of Science</h3>
<p>The successful spacewalk not only demonstrates human resilience but also advances our understanding of space and our capabilities to explore further into the unknown.</p>
</article>
</div>
</div>
</div>
</div>
<div class="footer">
<footer>
<p>Fictional News Article for Educational Use at UofC</p>
</footer>
</div>
</div>
</body>
</html>