Abby_EveryStory Posted October 6, 2022 Share Posted October 6, 2022 Site URL: http://everystory.co.uk/journal Hello! I added some code to make the blog post summary show in two columns on mobile. However, the top two posts seem to be misaligning (screenshot attached). Would very much appreciate some expert advice, thank you in advance! Here is the code I added: @media screen and (max-width:727px) { .summary-item-list { display: grid; grid-template-columns: repeat(2,1fr); grid-column-gap: 10px; } section.BlogList { display: grid; grid-template-columns: repeat(2,1fr); grid-column-gap: 10px; } } Link to comment
tuanphan Posted October 8, 2022 Share Posted October 8, 2022 Use this new code @media screen and (max-width:640px) { .summary-item-list { display: grid; grid-template-columns: repeat(2,1fr); grid-column-gap: 10px; } section.BlogList { display: grid; grid-template-columns: repeat(2,1fr); grid-column-gap: 10px; } section.BlogList>article { padding-top: 0 !important; margin-top: 0 !important; }} Abby_EveryStory 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Abby_EveryStory Posted October 14, 2022 Author Share Posted October 14, 2022 On 10/8/2022 at 10:24 AM, tuanphan said: Use this new code @media screen and (max-width:640px) { .summary-item-list { display: grid; grid-template-columns: repeat(2,1fr); grid-column-gap: 10px; } section.BlogList { display: grid; grid-template-columns: repeat(2,1fr); grid-column-gap: 10px; } section.BlogList>article { padding-top: 0 !important; margin-top: 0 !important; }} Thank you so much @tuanphan! I there a way the rows can be spaced without creating too much space at the top underneath the copy? Have attached a screenshot to hopefully explain. Link to comment
Solution tuanphan Posted October 17, 2022 Solution Share Posted October 17, 2022 On 10/14/2022 at 9:05 PM, Abby_EveryStory said: Thank you so much @tuanphan! I there a way the rows can be spaced without creating too much space at the top underneath the copy? Have attached a screenshot to hopefully explain. Use this new code @media screen and (max-width:640px) { .summary-item-list { display: grid; grid-template-columns: repeat(2,1fr); grid-column-gap: 10px; } section.BlogList { display: grid; grid-template-columns: repeat(2,1fr); grid-column-gap: 10px; grid-row-gap: 20px; } section.BlogList>article { padding-top: 0 !important; margin-top: 0 !important; } body#collection-5e9f3fccf8e45c4ccb23885e .columns-12 { padding-bottom: 0px; }} Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
Abby_EveryStory Posted October 17, 2022 Author Share Posted October 17, 2022 38 minutes ago, tuanphan said: Use this new code @media screen and (max-width:640px) { .summary-item-list { display: grid; grid-template-columns: repeat(2,1fr); grid-column-gap: 10px; } section.BlogList { display: grid; grid-template-columns: repeat(2,1fr); grid-column-gap: 10px; grid-row-gap: 20px; } section.BlogList>article { padding-top: 0 !important; margin-top: 0 !important; } body#collection-5e9f3fccf8e45c4ccb23885e .columns-12 { padding-bottom: 0px; }} Thank you so much @tuanphan thats worked perfectly! tuanphan 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment