Jump to content

How to remove mystery white space on mobile

Go to solution Solved by rwp,

Recommended Posts

Posted

Site URL: https://www.bottlerocketrecording.co.uk/

Hi @tuanphan, @RyanDejaegher, @paul2009, @bangank36, @christyprice

I've recently redesigned my site – transferring from Pacific to Brine. I'm pretty much there now apart from some frustrating glitches on mobile view, as explained below.

On mobile: The header at the top keeps mysteriously adding 8px + worth of padding to the top and bottom which is contributing to – if not wholly – causing it to obscure my section headings when using index scrolling from the hamburger menu. I've isolated the .mobile bar section and removed 8px with CSS but if you compare it to the desktop view there is clearly still more white space added around my branding box. Cosmetically – I'd obviously rather it were thinner but it's not that big a deal, but I do need it not to obscure my headings during scrolling, so it has to be fixed one way or another.

On Mobile, BLOG PAGE: There is another mystery white space between the "Notes from the Studio" intro Banner and the nav/branding bar at the top. I've tried reducing padding to that area using CSS and site styles. In most cases just causes the "notes from the Studio" banner to be chopped into. I've also tried that banner image in a number of different shapes and sizes and always get the same issue. Furthermore there have been many occasions where I seem to have fixed it – I go to my mobile device immediately after editing and it displays perfectly as as it should. Then then on reloading the page – the white space jumps back – almost saying "WAIT, I'M STILL HERE!, pushing the banner down again. This has been incredibly frustrating, especially when resizing and adjusting the padding to the "notes from ..." image block. In the section editor, Squarespace will show that I've solved the problem – everything looks fine – and then I open it on my actual phone and the white space is either still there or I've chopped the top or bottom off my banner. My only conclusion is there must be some rogue code somewhere that's over-riding everything or even a ghost block that can't be deleted that is pushing things to flow around it.

Hoping someone can shed some light!

Thanks!

Screen Shot 2020-06-16 at 15.26.59.png

Screen Shot 2020-06-16 at 15.27.15.png

  • Solution
Posted (edited)
@media screen and (max-width:960px) {
	.Index-page-content {
		padding-top: 120px;
		padding-bottom: 120px;
	}
}

@media screen and (max-width:640px) {
	.Index-page-content {
		padding-top: 60px;
		padding-bottom: 60px;
	}
}

This is what is causing the headings to be cut off, squarespace is shrinking the padding at a screen width of 640px

@media screen and (max-width:640px) {
	.Index-page-content {
		padding-top: 80px !important;
		padding-bottom: 80px !important;
	}
}

This should fix it.

@media screen and (max-width:960px) {
	#block-yui_3_17_2_1_1592315790530_4759 {
    	display: none;
	}
}

There's a spacer in your blog page on mobile, that will hide it.

Edited by rwp
Posted

Hi @rwp,

Thanks so much, you're a life saver!

There's still proportionally more white space above the "Notes from the Studio" text on the blog page – is there any code that can remove more white space proportionally without touching site styles?

Thanks again,

Jonny

Posted
@media screen and (max-width:960px) {
    #block-yui_3_17_2_1_1587978949387_4455 {
        margin-top: -50px;
        padding-bottom: 0px !important;
        margin-bottom: -10px;
    }
}

Give that a go.

  • 1 year later...

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.