Skip to content

Commit b9d26a6

Browse files
Fix table formatting in CSS
1 parent fcbf081 commit b9d26a6

File tree

1 file changed

+107
-80
lines changed

1 file changed

+107
-80
lines changed

css/hsf.css

Lines changed: 107 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
* Override Bootstrap's default container.
99
*/
1010

11-
@media (min-width: 1200px) {
11+
@media (min-width: 1200px) {
1212
.container {
1313
width: 970px;
1414
}
1515
}
1616

17-
1817
/*
1918
* Centered image
2019
*/
@@ -24,15 +23,14 @@
2423
display: block;
2524
}
2625

27-
2826
/*
2927
* Masthead for nav
3028
*/
3129

3230
.blog-masthead {
3331
background-color: #428bca;
3432
-webkit-box-shadow: inset 0 -2px 5px rgba(0,0,0,.1);
35-
box-shadow: inset 0 -2px 5px rgba(0,0,0,.1);
33+
box-shadow: inset 0 -2px 5px rgba(0,0,0,.1);
3634
}
3735

3836
/* Nav links */
@@ -67,7 +65,6 @@
6765
border-left: 5px solid transparent;
6866
}
6967

70-
7168
/*
7269
* Blog name and description
7370
*/
@@ -87,7 +84,6 @@
8784
color: #999;
8885
}
8986

90-
9187
/*
9288
* Main column and sidebar layout
9389
*/
@@ -113,7 +109,6 @@
113109
margin-bottom: 0;
114110
}
115111

116-
117112
/* Pagination */
118113
.pager {
119114
margin-bottom: 60px;
@@ -126,14 +121,13 @@
126121
border-radius: 30px;
127122
}
128123

129-
130124
/*
131125
* Blog posts
132126
*/
133127

134128
.blog-post {
135129
margin-bottom: 30px;
136-
padding: 10px 20px; /* I don't understand why this is needed... */
130+
padding: 10px 20px;
137131
}
138132
.blog-post-title {
139133
margin-bottom: 5px;
@@ -144,7 +138,6 @@
144138
color: #999;
145139
}
146140

147-
148141
/*
149142
* Footer
150143
*/
@@ -153,17 +146,86 @@
153146
margin-bottom: 50px;
154147
}
155148

149+
/* Table Styles */
150+
table {
151+
width: 100%;
152+
border-collapse: collapse; /* Ensures tables don't have gaps between cells */
153+
margin-bottom: 30px; /* Space below the table */
154+
}
155+
156+
th, td {
157+
padding: 12px; /* Adds space around content */
158+
text-align: left; /* Aligns text to the left */
159+
border: 1px solid #ddd; /* Light border color */
160+
}
161+
162+
th {
163+
background-color: #f8f9fa; /* Light background for header */
164+
font-weight: bold; /* Bold text for headers */
165+
}
166+
167+
tr:nth-child(even) {
168+
background-color: #f2f2f2; /* Alternating row colors */
169+
}
170+
171+
tr:hover {
172+
background-color: #e9ecef; /* Hover effect on rows */
173+
}
174+
175+
/* Training Table Styles */
176+
.training table {
177+
width: 100%;
178+
border-collapse: collapse; /* Ensures there are no gaps between cells */
179+
}
180+
181+
.training table tr {
182+
background-color: white;
183+
border: 1px solid #cccccc; /* Add borders around rows */
184+
}
185+
186+
.training table tr:nth-child(2n) {
187+
background-color: #f8f8f8; /* Alternate row color */
188+
}
189+
190+
.training table th, .training table td {
191+
padding: 8px 15px; /* Adjust padding for better spacing */
192+
border: 1px solid #cccccc; /* Border for cells */
193+
text-align: left; /* Align text to the left */
194+
}
195+
196+
.training table th {
197+
background-color: #f0f0f0; /* Light background for table headers */
198+
font-weight: bold; /* Make header text bold */
199+
}
200+
201+
.training table tr:hover {
202+
background-color: #f2f2f2; /* Hover effect for rows */
203+
}
204+
205+
.training table tr td:first-child,
206+
.training table tr th:first-child {
207+
padding-left: 20px; /* Add extra padding on the left for the first column */
208+
}
209+
210+
.training table tr td:last-child,
211+
.training table tr th:last-child {
212+
padding-right: 20px; /* Add extra padding on the right for the last column */
213+
}
214+
215+
/* Footer */
156216
.blog-footer {
157217
padding: 40px 0;
158218
color: #999;
159219
text-align: center;
160220
background-color: #f9f9f9;
161221
border-top: 1px solid #e5e5e5;
162222
}
223+
163224
.blog-footer p:last-child {
164225
margin-bottom: 0;
165226
}
166227

228+
/* Navbar */
167229
.navbar-nav {
168230
padding-top: 0px;
169231
padding-bottom: 0px;
@@ -177,20 +239,20 @@
177239
}
178240

179241
.navbar-brand {
180-
height: 40px;
181-
padding: 9.5px 15px;
182-
font-size: 15px;
242+
height: 40px;
243+
padding: 9.5px 15px;
244+
font-size: 15px;
183245
}
184246

185247
.navbar-default .navbar-nav > li > a:focus,
186248
.navbar-default .navbar-nav > li > a:hover,
187-
.navbar-default .navbar-brand:hover{
249+
.navbar-default .navbar-brand:hover {
188250
color: #f39c12;
189251
}
190252

191253
.navbar-nav>li>a {
192-
padding-top: 9.5px;
193-
padding-bottom: 9.5px
254+
padding-top: 9.5px;
255+
padding-bottom: 9.5px;
194256
}
195257

196258
a {
@@ -212,25 +274,25 @@ body {
212274
}
213275

214276
.announcement {
215-
background-color: #f39c12;
216-
border-color: #f39c12;
217-
color: #ffffff;
218-
padding: 15px;
219-
margin-bottom: 21px;
220-
border: 1px solid transparent;
221-
border-radius: 4px;
222-
margin-left: -15px;
223-
margin-right: -15px;
277+
background-color: #f39c12;
278+
border-color: #f39c12;
279+
color: #ffffff;
280+
padding: 15px;
281+
margin-bottom: 21px;
282+
border: 1px solid transparent;
283+
border-radius: 4px;
284+
margin-left: -15px;
285+
margin-right: -15px;
224286
}
225287

226288
.lead {
227289
font-size: 20px;
228290
}
291+
229292
.event-announce > a:hover {
230-
color: #333333;
293+
color: #333333;
231294
}
232295

233-
234296
.alert {
235297
padding: 8px;
236298
}
@@ -241,22 +303,22 @@ body {
241303

242304
.dropdown-menu > li > a:hover,
243305
.dropdown-menu > li > a:focus {
244-
background-color: #555555;
306+
background-color: #555555;
245307
}
246308

247309
[role="button"] {
248-
font-size: 17px;
310+
font-size: 17px;
249311
}
250312

251313
.alignleft {
252314
float: left;
253315
}
316+
254317
.alignright {
255318
float: right;
256319
}
257320

258321
/* COLORFUL BIG LINK */
259-
260322
.big-link-container {
261323
width: 100%;
262324
display: grid;
@@ -280,9 +342,6 @@ body {
280342
}
281343

282344
/* TRAINING GROUP */
283-
284-
/* LIST OF MODULES */
285-
286345
.training-module {
287346
width: 100%;
288347
min-height: 100pt;
@@ -298,6 +357,7 @@ body {
298357
.tm-alpha {
299358
background-image: repeating-linear-gradient(-45deg, transparent, transparent 20px, #f9f2f4 20px, #f9f2f4 40px);
300359
}
360+
301361
.tm-beta {
302362
background-image: repeating-linear-gradient(-45deg, transparent, transparent 10px, #f9f9f1 10px, #f9f9f1 40px);
303363
}
@@ -309,7 +369,6 @@ body {
309369
font-size: 17px;
310370
}
311371

312-
313372
.training-module-status {
314373
padding-top: 10pt;
315374
text-align: center;
@@ -330,7 +389,6 @@ body {
330389
align-self: end;
331390
}
332391

333-
334392
.training-module-videos {
335393
text-align: center;
336394
display: block;
@@ -344,59 +402,28 @@ body {
344402
gap: 10px;
345403
}
346404

347-
.training table {
348-
padding: 0;
349-
width: 100%;
350-
}
351-
.training table tr {
352-
border: 1px solid #cccccc;
353-
background-color: white;
354-
margin: 0;
355-
padding: 0;
356-
}
357-
.training table tr:nth-child(2n) {
358-
background-color: #f8f8f8;
359-
}
360-
.training table tr th {
361-
font-weight: bold;
362-
border: 1px solid #cccccc;
363-
text-align: left;
364-
margin: 0;
365-
padding: 6px 13px;
366-
}
367-
.training table tr td {
368-
border: 1px solid #cccccc;
369-
text-align: left;
370-
margin: 0;
371-
padding: 6px 13px;
372-
}
373-
.training table tr th :first-child, .training table tr td :first-child {
374-
margin-top: 0;
375-
}
376-
.training table tr th :last-child, .training table tr td :last-child {
377-
margin-bottom: 0;
378-
}
379-
380405
figure.centered-figure {
381-
text-align: center
406+
text-align: center;
382407
}
408+
383409
.centered-figure > img {
384-
width:80%;
385-
max-width: 600px
410+
width: 80%;
411+
max-width: 600px;
386412
}
413+
387414
.centered-figure > figcaption {
388-
width:80%;
389-
max-width: 600px;
390-
text-align: center;
391-
margin: 0 auto;
415+
width: 80%;
416+
max-width: 600px;
417+
text-align: center;
418+
margin: 0 auto;
392419
}
393420

394-
/* Media Queries */
421+
/* Media Queries */
395422

396423
@media (max-width: 620px) {
397424
.big-link-container {
398-
grid-template-columns: 1fr;
425+
grid-template-columns: 1fr;
399426
}
400-
.big-link-container a {
401-
min-height: 0;
402-
}
427+
428+
.big-link
429+

0 commit comments

Comments
 (0)