Site logo

[Support request] Issue with setting padding in %

Home Forums Support [Support request] Issue with setting padding in %

Home Forums Support Issue with setting padding in %

  • This topic has 7 replies, 3 voices, and was last updated 3 years ago by David.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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.

    #2564865
    David
    Staff
    Customer Support

    Hi 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.

    #2565024
    Aleksi

    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.

    #2565151
    Ying
    Staff
    Customer Support

    If 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?

    #2565204
    Aleksi

    Yes sure, here it is.

    #2565298
    Ying
    Staff
    Customer Support

    What 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?

    #2565876
    Aleksi

    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.

    #2566369
    David
    Staff
    Customer Support

    We 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 ?

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.