Jump to content

Adjusting margins so images sit flush with edge of device screen

Recommended Posts

Site URL: https://www.revealwellnessco.com/services

Hi @tuanphan!

I was hoping you could help me address this issue...

I want to ensure my that some images on my site are flush with the edge of the screen.

Right now, I am using margin to move the images. It looks great, but you can see past the page edge on the right-hand side of the screen (see screenshots and URL). Should I being padding instead? Ideally, I would like a few images throughout the site to automatically sit flush with the edge of the screen. Right now, I'm using media quires and margins which is fine, but worry that the images won't appear completely flush, depending on the users screen size. I've included the code below. Can you advise?

Thanks so much! 

+++++++++++++++++++++++++++++++

//services page - images - desktop//
@media only screen and (min-width: 767px) {#block-yui_3_17_2_1_1646840179996_8049{
  margin-top:-47px; 
  margin-left:-40px;}
}

@media only screen and (min-width: 767px) {#block-yui_3_17_2_1_1646840179996_20824{
  margin-right:-40px;}
}

@media only screen and (min-width: 767px) {#block-e3723ef4e2b2d4d21687{
  margin-bottom:-63px; 
  margin-left:-40px;}
}

 

Screen Shot 2022-03-15 at 12.08.19 AM.png

Screen Shot 2022-03-15 at 12.08.29 AM.png

Screen Shot 2022-03-15 at 12.08.38 AM.png

Edited by AshV3
Link to comment
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

@tuanphan - Amazing - that worked! Thank you so much!

Is there a way to write the code so the desired images (three on the services page, two on the homepage) automatically sits flush with the edge of the user's screen (for the left and right margins)? For example, if I had a iPhone12 vs. an iPhone12+...the images (left and right margins) would not sit flush with the larger screen. 

Edited by AshV3
Link to comment
6 hours ago, AshV3 said:

@tuanphan - Amazing - that worked! Thank you so much!

Is there a way to write the code so the desired images (three on the services page, two on the homepage) automatically sits flush with the edge of the user's screen (for the left and right margins)? For example, if I had a iPhone12 vs. an iPhone12+...the images (left and right margins) would not sit flush with the larger screen. 

Hi. Can you take some screenshots on these devices?

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment

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.