Jump to content

Blog Posts: CSS to get Images to Stretch across Whole Screen on Mobile?

Recommended Posts

Site URL: https://www.recaprabbithole.com/recap/dr-anthony-fauci

I want everything except text, to stretch across the whole screen on all of the actual blog posts themselves. on Mobile only. 

See attached image:

 

This worked:

 

 

/* make image fullwidth */
.blog-item-wrapper article.entry {
    padding-left: 0;
    padding-right: 0;
}
/* make spacing between text blocks - both side */
.blog-item-wrapper .sqs-layout>.row>.col>div:not(.image-block) {
    padding-left: 8vw;
    padding-right: 8vw;
}
html, body {
  overflow: hidden;
}

Link to comment
  • Replies 13
  • Views 1.6k
  • Created
  • Last Reply

Remove above code & use this

@media screen and (max-width:767px) {
.blog-item-wrapper article.entry {
    padding-left: 0;
    padding-right: 0;
}
.blog-item-wrapper .sqs-layout>.row>.col>div:not(.image-block) {
    padding-left: 6vw;
    padding-right: 6vw;
}

}

 

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

 

34 minutes ago, tuanphan said:

Remove above code & use this


@media screen and (max-width:767px) {
.blog-item-wrapper article.entry {
    padding-left: 0;
    padding-right: 0;
}
.blog-item-wrapper .sqs-layout>.row>.col>div:not(.image-block) {
    padding-left: 6vw;
    padding-right: 6vw;
}

}

 

Still no luck. It makes the page on the mobile have black space on the right hand-side. 

Something is wrong with the scale and width. 

IMG_8561.PNG

Link to comment

I see it works here. Did you insert my code or..?

@media screen and (max-width:767px) {
/* make image fullwidth */
.blog-item-wrapper article.entry {
    padding-left: 0;
    padding-right: 0;
}
/* make spacing between text blocks - both side */
.blog-item-wrapper .sqs-layout>.row>.col>div:not(.image-block) {
    padding-left: 6vw;
    padding-right: 6vw;
}
}

image.thumb.png.1d7594be64ebee334c30bacbc75a0b44.pngimage.thumb.png.1d7594be64ebee334c30bacbc75a0b44.png

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.