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

    Hi Guys,

    I have got a page containing basically 2 columns, a 2/3 column followed by the 1/3 columns. I was wondering if there is a css snippet available to enforce that the 1/3 column keeps a certain min-width while the 2/3 column behaves flexible in width. This should be this way until the breakpoint (767 px) where the 1/3 column is plotted in full width below the 2/3 element.

    I have tried adding a min-width to the div class of the 1/3 column but than the 1/3 column directly jumps out of sight to the next row when the viewport gets smaller.

    Thanks and regards

    #1429784

    Hey Enfoldfanatic,

    Thank you for the inquiry.

    Move the columns inside a Color Section element and apply a custom class name (Advanced > Developer Settings . Custom CSS Class) to it, “av-custom-flex-column ” for example. You can then add this css code to apply a minimum width to the first column.

    .av-custom-flex-column .entry-content-wrapper {
        display: flex;
        flex-direction: row;
    }
    
    .av-custom-flex-column .entry-content-wrapper .flex_column:nth-child(1) {
        min-width: 300px;
    }

    Best regards,
    Ismael

    #1429790

    Hi Ismael,

    Thanks for your solution, the only thing is that the column which should have a fixed width is the 2nd column. Should I simply replace the “nth-child(1)” with “nth-child(2)” to apply the behavior on the 2nd column?

    Kind Regards

    #1429858

    Hi,

    Should I simply replace the “nth-child(1)” with “nth-child(2)”

    Yes, that should work. Is the second column a 1/3 column element?

    Best regards,
    Ismael

    #1429871

    Hi Ismael,

    Indeed the 2nd column is the 1/3 column. I have applied this css, in general it works out fine however it seems that this code forces a “equal height” behavior of both the 2/3 and 1/3 column. I noticed this since the 1/3 column has a border but the content in there is limited. Now when narrowing the viewport the 2/3 column nicely behaves responsive but the border of the 1/3 column (with the min-width setting) stretched along.

    Can we update the snippet to ensure that the 1/3 column doesn’t stretch out unnecessary since the border displays the wrong displaying.

    Thanks and regards

    #1429898

    Hi,

    Thank you for the update.

    We may need to see the site so that we can inspect the elements and check the current settings. Please provide the site URL in the private field. A screenshot will also help.

    Best regards,
    Ismael

    #1429899

    Hi Ismael,

    I’m posting a screenshot URL and the site link in the private content.

    Thanks for your help!

    #1429985

    Hi,
    Try removing the css above and try this CSS in your Enfold Theme Options ▸ General Styling ▸ Quick CSS field instead:

    @media only screen and (min-width: 768px) and (max-width: 1290px) { 
    #main .showroomfirst .av_two_third.showroomcontainer {
    	width: 48%;
    }
    #main .showroomfirst .av_one_third.dealerdetailsrechts {
    	width: 340px;
    	padding: 25px;
    	float: right;
    	margin: 0;
    }
    }

    After applying the css, please clear your browser cache and check.

    Best regards,
    Mike

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