Skip to content

Commit 59e6cef

Browse files
committed
flexbox -> media query for header
1 parent bd43220 commit 59e6cef

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

css/main.css

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -124,55 +124,40 @@ a:visited { color: #205caa; }
124124
/* Site header */
125125

126126
.site-header {
127+
position: relative;
127128
border-bottom: 1px solid #e8e8e8;
128-
min-height: 56px;
129129
background-color: #8C1515;
130-
padding: 10px 10px;
131-
display: flex;
132-
flex-flow: row wrap;
133-
align-items: center;
134-
justify-content: center;
130+
padding: 15px;
131+
text-align: center;
135132
}
136133

137134
.site-title,
138135
.site-title:hover,
139136
.site-title:visited {
140-
flex: 3 3 800px;
141-
margin: 0 auto;
142-
text-align: center;
137+
display: block;
138+
padding: 10px;
143139
font-size: 26px;
144140
line-height: 1.2em;
145141
letter-spacing: -1px;
146142
color: #FFF;
147143
font-weight: 100;
148144
}
149145

150-
.site-header::before,
151146
.site-link:link,
152147
.site-link:hover,
153148
.site-link:visited {
154-
/* flex: 1 1 0px; */
149+
margin-bottom: 10px;
150+
display: inline-block;
155151
text-align: center;
156-
white-space: nowrap;
157-
margin: 10px;
158152
font-size: 18px;
159153
line-height: 2em;
154+
height: 2em;
160155
padding: 0 10px;
161156
color: #fff;
162157
border: 2px solid #fff;
163158
font-weight: 50;
164159
}
165160

166-
.site-header::before {
167-
/* Pseudo-element for centering */
168-
/* Should maintain ~the same width as .site-link */
169-
content: "flexbox-dummy";
170-
visibility: hidden;
171-
height: 0;
172-
margin-top: 0;
173-
margin-bottom: 0;
174-
}
175-
176161
/* Site footer */
177162

178163
.site-footer {
@@ -420,6 +405,15 @@ a:visited { color: #205caa; }
420405
/* media queries */
421406
/* ----------------------------------------------------------*/
422407

408+
@media (min-width: 1080px) {
409+
.site-link:link,
410+
.site-link:visited {
411+
position: absolute;
412+
right: 20px;
413+
top: 50%;
414+
transform: translateY(-50%);
415+
}
416+
}
423417

424418
@media screen and (max-width: 750px) {
425419

0 commit comments

Comments
 (0)