Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1401930

    hey there,

    i would like to keep 2 small columns and center them.

    I gave an Id to my color section and this code, but it does not work. Perhaps you have a solution for me?

    `#av-center-align-columns .entry-content-wrapper {
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-flex-flow: row wrap;
    justify-content: center;
    }

    #1401970

    Hey Monika,

    Thank you for the inquiry.

    Have you tried placing another 1/4 column on both sides of the existing columns? This should align the first two columns in the center without using additional css.

    Best regards,
    Ismael

    #1401984

    thank you for your answer.
    If the two columns could be very small it would be ok but i want them to be minimum 1/3 width.
    How can i center them both?

    #1401987

    Hi Monika,

    The ID is not set on the Color Section, try to add this CSS code:

    .page-id-20 #av_section_5 .flex_column_table {
        display: flex;
        gap: 4%;
        justify-content: center;
    }
    
    .page-id-20 #av_section_5 .flex_column_table .flex_column {
        display: block;
        width: 33%;
        margin-left: 0;
    }
    
    .page-id-20 #av_section_5 .flex_column_table .av-flex-placeholder {
        display: none;
    }

    Best regards,
    Nikko

    #1401991

    Great!! Thank you Nikko,
    that worked.

    I have already a background css class given to that section so I wanted to adress centered Column section by ID.

    But now I’m confused.
    Why does this work, in this specific class even tough i havent given it any class name like “page-id-20”??
    Why is it just working for this class and not for all?
    I will need this column styling for other pages too. so where can i tell an other color section to be also centered?

    Thanks!
    Monika

    #1402078

    Hi Monika,

    You’re welcome :)
    By default, the body of the page has a class of page-id-ID, so when you use this CSS selector .page-id-20 it will only target the page with that ID number.
    Also, Color Sections ID are auto-generated if you don’t set one, so if you don’t put one then it will automatically have the id of #av_section_1 and then increments in every Color Section. Also, Custom IDs are good idea if you only have one on the page since it’s supposed to be unique, if you use this layout twice in a single page then use Custom CSS Class instead of Custom ID Attribute. So what I suggest instead is to use a Custom CSS Class, let’s just name it center-columns (add this on each Color Section) and replace the code I gave you with:

    #top .center-columns .flex_column_table {
        display: flex;
        gap: 4%;
        justify-content: center;
    }
    
    #top .center-columns .flex_column_table .flex_column {
        display: block;
        width: 33%;
        margin-left: 0;
    }
    
    #top .center-columns .flex_column_table .av-flex-placeholder {
        display: none;
    }

    Hope this helps.

    Best regards,
    Nikko

    #1408348

    Nikko,

    Your final solution also worked exceedingly well for my StructInt.com website and the many webpages where we needed two 1/3 elements centered.

    Thank you!

    All the Best,
    Nathan

    #1408354

    Hi Nathan,

    I’m very happy to hear that!
    Thanks for your kind feedback and thank you for using Enfold. :)

    Best regards,
    Nikko

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