Site logo

[Resolved] Sections margins and padding

Home Forums Support [Resolved] Sections margins and padding

Home Forums Support Sections margins and padding

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1736224
    ch1800

    Hello,

    This homepage has 6 sections, 3 with texts and 3 hero.

    For the text sections I would like to add left+right margins for desktop view only.
    I tried this with no success as they also apply to mobile view:

    @media( max-width: 768px ) {
     #generate-section-1 .generate-sections-inside-container {
        margin-left: 6%;
        margin-right: 6%;
    }
    } 

    And for the hero sections I would like to add left+right padding for inside container (not the background) also for desktop view only.
    I tried this with no success either:

    @media( max-width: 768px ) {
    #generate-section-2 .generate-sections-inside-container {
        padding-left: 10%;
        padding-right: 10%;
    }
    }

    I’m adding this at the page’s CSS only, not at global.

    Thanks.

    #1736249
    Elvin
    Staff
    Customer Support

    Hi there,

    You’re using the @media rule for mobile.

    The media rule for tablets and desktop is @media(min-width:769px)

    and if for tablets only, its @media(min-width:769px) and (max-width:1024px)

    and if for desktop only, its @media(min-width:1025px)

    #1736268
    ch1800

    Ha, yep, many thanks for this!

    #1736337
    Elvin
    Staff
    Customer Support

    No problem. glad to be of any help. 😀

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