Jump to content

Misaligned blog posts on mobile

Go to solution Solved by tuanphan,

Recommended Posts

Posted

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;
}
}

IMG_68075218D9E1-1.jpeg

Posted

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;
}}

 

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!)

Posted
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.

Screenshot 2022-10-14 at 15.04.11.png

  • Solution
Posted
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.

Screenshot 2022-10-14 at 15.04.11.png

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!)

Posted
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!

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.