mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -06:00
Use horizontal scrolling on related posts section
This commit is contained in:
parent
2371f1de13
commit
42a7e27d09
@ -247,12 +247,13 @@
|
|||||||
|
|
||||||
/* Related posts */
|
/* Related posts */
|
||||||
.related hr {
|
.related hr {
|
||||||
margin: 25px 0px;
|
margin: 25px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 720px) {
|
@media (min-width: 720px) {
|
||||||
.related {
|
.related {
|
||||||
/* this makes it full width -- 720px max-width on body */
|
/* this makes it full width -- 720px max-width on body
|
||||||
|
* add an extra 40px to give a 20px margin on left and right */
|
||||||
margin-left: calc(-100vw / 2 + 760px / 2);
|
margin-left: calc(-100vw / 2 + 760px / 2);
|
||||||
margin-right: calc(-100vw / 2 + 760px / 2);
|
margin-right: calc(-100vw / 2 + 760px / 2);
|
||||||
}
|
}
|
||||||
@ -261,10 +262,9 @@
|
|||||||
.related-posts {
|
.related-posts {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
grid-template-columns: repeat(auto-fit, minmax(0, 360px));
|
grid-auto-flow: column;
|
||||||
}
|
grid-auto-columns: 300px;
|
||||||
|
overflow-x: auto;
|
||||||
.related-posts .post {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user