- This topic has 7 replies, 3 voices, and was last updated 3 years ago by
David.
-
AuthorPosts
-
March 12, 2023 at 6:36 am #2564816
Aleksi
Hi thanks for GP and GB,
About setting the padding in % to keep the same spacing ratio between differents width size and also in this case the top padding between the 1920 and the 1440 version.
I tried to set the top padding in the first section (front page) from the 1440 version, i set the block minimum height to 728px (from the 1440 version), and calculated the padding in % from that (96/728), but it didn’t get it right.
Any idea on how we can calulate that? or any other solution to that?
Thanks.
March 12, 2023 at 7:29 am #2564865David
StaffCustomer SupportHi there,
in CSS – if you use % for padding ( and margin ) then the calculated sizes are always relative to the elements width. Even Top and Bottom.
So don’t use % padding, use fixed pixels or another unit.
March 12, 2023 at 8:12 am #2565024Aleksi
Thanks,
If understand well, top and bottom padding % are not calculated from the element’s height, but it’s width?
So it’s seems the only solution is to set that manually with CSS for the 1920 version.
March 12, 2023 at 11:14 am #2565151Ying
StaffCustomer SupportIf understand well, top and bottom padding % are not calculated from the element’s height, but it’s width?
That’s right.
So it’s seems the only solution is to set that manually with CSS for the 1920 version.
We need to see your HTML structure to advice.
Can you link us to your site?March 12, 2023 at 12:49 pm #2565204Aleksi
Yes sure, here it is.
March 12, 2023 at 5:11 pm #2565298Ying
StaffCustomer SupportWhat are the differences between the 1440 version and 1920 version for the blue container?
What will the blue container width and height be in the 1920 version?
March 13, 2023 at 5:54 am #2565876Aleksi
There was an update. It’s full width now.
For the headline top padding it’s 120 on 1920 and 96 on 1440.
So i will have to either set it manually for screen width 1441-1920, or set padding in % to keep the ratio on difference device size.
March 13, 2023 at 11:17 am #2566369David
StaffCustomer SupportWe don’t have custom breakpoints for those kinds of changes but its not impossible.
Before we look at the options, are there any other changes that happen between these screen sizes ? -
AuthorPosts
- You must be logged in to reply to this topic.