Skip to content

Commit d636a2b

Browse files
committed
style: modify text width
1 parent 0f3b1a0 commit d636a2b

2 files changed

Lines changed: 26 additions & 14 deletions

File tree

website/index.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@
2929
<div id="website">
3030

3131
<!-- Each .section becomes a full-screen panel -->
32-
<div class="section" data-anchor="introduction" style="--bg-img: url('data/intro_background.jpg')">
32+
<div class="section" data-anchor="title" style="--bg-img: url('data/intro_background.jpg')">
3333
<h1>Olympic Inequalities</h1>
34+
</div>
35+
36+
<div class="section" data-anchor="introduction">
3437
<h2>How have sociocultural, economic, and geopolitical contexts been reflected in the Olympics over time?</h2>
3538
<p>
3639
At first glance, the Olympics look like so-called fair Games: the best atheletes compete, and the best win.
@@ -44,6 +47,7 @@ <h2>How have sociocultural, economic, and geopolitical contexts been reflected i
4447
Scroll through the story to see how social, political, and economic contexts have shaped
4548
the Games over time.
4649
</p>
50+
4751
</div>
4852

4953
<div class="section" data-anchor="gender">

website/styles.css

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -119,52 +119,60 @@ p {
119119
}
120120

121121
h1,
122-
h2,
123-
h3 {
122+
h2 {
124123
font-family: "Carter One", sans-serif;
125124
text-align: center;
126-
margin: 0;
127125
}
128126

129127
h1 {
130128
font-size: 60px;
131-
padding-bottom: 24px;
132129
}
133130

134131
h2 {
135132
font-size: 40px;
136-
padding-bottom: 24px;
137-
}
138-
139-
h3 {
140-
font-size: 30px;
141-
text-align: left;
133+
padding-bottom: 32px;
134+
margin: 0 auto;
135+
width: 80%;
142136
}
143137

144138
p {
145139
text-align: justify;
146140
padding-bottom: 6px;
141+
margin: 0 auto;
142+
width: 60%;
147143
}
148144

149145
/* =============================================
150-
Introduction section
146+
Title section
151147
=========================================== */
152148

153-
.section[data-anchor="introduction"] {
149+
.section[data-anchor="title"] {
154150
box-sizing: border-box;
155151
background-attachment: fixed;
156152
background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), var(--bg-img);
157153
background-position: center;
158154
background-repeat: no-repeat;
159155
background-size: cover;
156+
}
157+
158+
/* =============================================
159+
Introduction section
160+
=========================================== */
161+
162+
.section[data-anchor="introduction"] {
160163
display: flex;
161164
flex-direction: column;
162165
}
166+
/*
167+
[data-anchor="introduction"] h2 {
168+
margin: 0 auto;
169+
width: 80%;
170+
}
163171
164172
[data-anchor="introduction"] p {
165173
margin: 0 auto;
166174
width: 60%;
167-
}
175+
} */
168176

169177
/* =============================================
170178
Gender section

0 commit comments

Comments
 (0)