- This topic has 7 replies, 2 voices, and was last updated 2 months, 2 weeks ago by David.
November 5, 2021 at 4:21 am #1992388DAVID
what would be the best way to get a consistent height and with on a page ?
I’m having issues on each page on my website and struggling to get it consistent
would i be better using margin or padding ? some times the margin is automatically set for example (40,0,0,0) and other times its all set to 0
i mainly have this issue in mobile but i think that’s because it stands out more on this
any help appreciated
ThanksNovember 5, 2021 at 5:34 am #1992465DavidStaffCustomer Support
so i checked the
/hospitality-and-leisurepage to see the differences.
Both pages are built with a parent GB Container Block.
/abouthas 20px margin ALL round in the container spacing
/hospitality-and-leisurehas 40px Top Margin in the container spacing
Personally i would remove the margins, and just add consistent Padding.
Padding keeps the spacing within the Container.
Whereas margins creates space outside of it – so you introducing gaps between elements and the browser edges… which means body background colors if different to the Container background will show throughNovember 5, 2021 at 5:56 am #1992483DAVID
some of the margin stuff is greyed out but has a number there, should i 0 them all out ?
what would you recommend as a good padding numberNovember 5, 2021 at 6:55 am #1992553DavidStaffCustomer Support
If you’re on the tablet or mobile previews when editing the styles – the greyed out numbers are the values its inheriting from the desktop or tablet.
I would suggest fixing the Desktop spacing and first remove any Margins – delete the values or set them to 0.
Then add padding, for Desktop 40px is good, and for mobile you may want to reduce it down to 20/30pxNovember 5, 2021 at 12:23 pm #1993134DAVID
thats great david,
what would you say for text sizes as i have the same issue with this
daveNovember 5, 2021 at 5:03 pm #1993310DavidStaffCustomer Support
I generally stick to 17px for the Body font for both mobile and desktop. Unless the particular font dictates a smaller or larger size.
And where possible avoid setting those sizes in the block editor for your regular text/headings instead manage them in the Theme.November 8, 2021 at 10:39 am #1996288DAVID
Thank youNovember 8, 2021 at 10:58 am #1996321
- You must be logged in to reply to this topic.