summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlmightyMiau <almightymeow612@gmail.com>2025-02-06 22:31:17 -0800
committerAlmightyMiau <almightymeow612@gmail.com>2025-02-06 22:31:17 -0800
commitdbc730716a9f4ad8adf9a576d117b8978ba59b74 (patch)
treeac675254e80e63199028091e77c886fdf100c611
parentdbe51793ab920b9eff75f5fe4b5afda6f93fb6f8 (diff)
Set up Flex containers and fit header with Flex
Added .section class to all 4 sections. Added #links to header links span. Made new area in styles.css for aranging items.
-rw-r--r--index.html10
-rw-r--r--styles.css34
2 files changed, 39 insertions, 5 deletions
diff --git a/index.html b/index.html
index 90106ff..6296588 100644
--- a/index.html
+++ b/index.html
@@ -8,11 +8,11 @@
<title>Document</title>
</head>
<body>
- <div id="top">
+ <div id="top" class="section">
<!--Header-->
<div id="header">
<span id="logo">Header Logo</span>
- <span>
+ <span id="links">
<a>header link one</a>
<a>header link two</a>
<a>header link three</a>
@@ -34,7 +34,7 @@
<img>
</div>
</div>
- <div id="info">
+ <div id="info" class="section">
<h2>
Some random information
</h2>
@@ -63,7 +63,7 @@
</h6>
</div>
</div>
- <div id="quote">
+ <div id="quote" class="section">
<p>
This is an inspiring quote, or a testimonial from a
customer. Maybe it's just filling up space, or maybe
@@ -74,7 +74,7 @@
-Thor, God of Thunder
</h3>
</div>
- <div id="bottom">
+ <div id="bottom" class="section">
<div id="call-to-action">
<p>
<h3>
diff --git a/styles.css b/styles.css
index 8a2db50..521a7d8 100644
--- a/styles.css
+++ b/styles.css
@@ -4,6 +4,40 @@
margin: 0px;
}
+/* Arrangement of items */
+.section {
+ display: flex;
+ justify-content: center;
+}
+#top { /* Container for Top section */
+ flex-direction: column;
+ align-items: center;
+}
+#header { /* Container for Logo and Links */
+ width: 75%;
+ margin-top: 2%;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+}
+#logo {
+ flex: auto;
+ min-width: 60px;
+ min-height: 60px;
+}
+#links { /* Container for the header links */
+ display: flex;
+ justify-content: space-between;
+ flex-wrap: nowrap;
+}
+#links a {
+ padding: 4px 10px;
+ flex: auto;
+ min-width: 60px;
+ min-height: 60px;
+}
+
+/* Style of items */
#top {
background-color: #1F2937;
color: #F9FAF8;