-
AuthorPosts
-
June 7, 2021 at 9:22 pm #1304483
I would like to switch to 100% width grid columns (mobile view) already at 1500 px width.
June 9, 2021 at 8:37 am #1304807Hey netzhautflimmern,
Thank you for the inquiry.
You can use this css code to adjust the breakpoint of the grid row cells.
/* Grid Row Cells Breakpoint */ @media only screen and (max-width: 1500px) { .responsive #top #wrap_all .flex_column.av-break-at-tablet, .responsive #top #wrap_all .av-break-at-tablet .flex_cell { margin: 0; margin-bottom: 20px; width: 100%; display: block; } .responsive #top #wrap_all .av-break-at-tablet-flextable, .responsive .av-layout-grid-container.av-break-at-tablet { display: block; } .responsive #top #wrap_all .av-flex-cells .no_margin{ height:auto !important; overflow: hidden; } }
Best regards,
IsmaelOctober 6, 2021 at 12:51 pm #1323762Dear Kriesi Team,
I used this code (slightly adapted, e.g. width: 50%) for my own project to switch from a four-column grid row to a two-column grid row on smaller mobile devices (max-width 1366px, min-width 768px). Unfortunately this code and some others I tried myself did not work.
In the meantime I tried reach the same with normal columns instead of grid row (4 columns on desktop, 2 columns on tablet landscape, 1 column on tablet portrait and smartphone). I would like the 2-column layout on mobile devices with max-width 1366, min-width 768px. Unfortunately my CSS-code to achieve this, does not work properly. It shows the 2 columns next to each other, however column 3 and 4 do not follow nicely: column 3 does not float to the left under column 1, but already starts unter column 2. I tried with CSS float, display, position, but nothing worked.
@media only screen and (max-width: 1366px) {
div .av_one_fourth {
width: 46%;
margin-left: 4%;
float: left !important;
}
}Could you please help me with the right CSS code? Many thanks in advance!
Best regards, Cornelie
October 8, 2021 at 2:28 am #1324010Hi,
Thank you for the inquiry.
You may need to disable the Equal Height option and adjust the css code a bit.
.responsive .av_one_fourth.first.el_before_av_one_fourth.flex_column_div, .responsive .av_one_fourth.first + .av_one_fourth + .av_one_fourth.flex_column_div, .responsive .av_one_half.first + .av_one_fourth.el_before_av_one_fourth.flex_column_div, .responsive .av_one_fourth.first + .av_one_fourth + .av_one_half.flex_column_div, .responsive .avia-content-slider-inner .av_one_fourth.first.flex_column_div { margin-left: 0%; clear: none; width: 48%; float: left; } .responsive .av_one_fourth.first.el_before_av_one_fourth.flex_column_div, .responsive .av_one_fourth.first + .av_one_fourth.flex_column_div, .responsive .av_one_fourth.first + .av_one_fourth + .av_one_fourth.flex_column_div, .responsive .av_one_fourth.first + .av_one_fourth + .av_one_fourth + .av_one_fourth.flex_column_div, .responsive .av_one_half.first + .av_one_fourth.el_before_av_one_fourth.flex_column_div, .responsive .av_one_half.first + .av_one_fourth.el_before_av_one_fourth + .av_one_fourth.flex_column_div, .responsive .avia-content-slider-inner .av_one_fourth.flex_column_div { margin-left: 4%; width: 48%; float: left; }
Please toggle or temporarily disable the Enfold > Performance > File Compression settings after adding the css code.
Best regards,
IsmaelOctober 8, 2021 at 9:12 am #1324063Dear Ismael,
thanks a lot for your quick reply. I tried the new CSS code, but unfortunately with no success. With your settings, all columns are displayed below one another. So I changed the margins and width a little to fit at least two columns next to each other on my tablet.
Despite of disabling File Compression settings and disabling Equal Height, the third column stills connects below the second one, because the first one is higher due to more text. [I thought the option Equal Height was meant for such situations, but probably I misunderstood.] Anyway, the CSS code now looks like this, but it does not do the job:
@media only screen and (max-width: 1366px) {
.responsive .av_one_fourth.first.el_before_av_one_fourth.flex_column_div, .responsive .av_one_fourth.first + .av_one_fourth + .av_one_fourth.flex_column_div, .responsive .av_one_half.first + .av_one_fourth.el_before_av_one_fourth.flex_column_div, .responsive .av_one_fourth.first + .av_one_fourth + .av_one_half.flex_column_div, .responsive .avia-content-slider-inner .av_one_fourth.first.flex_column_div {
margin-left: 0%;
clear: none;
width: 46%; /* Kriesi: 48% */
float: left;
}.responsive .av_one_fourth.first.el_before_av_one_fourth.flex_column_div, .responsive .av_one_fourth.first + .av_one_fourth.flex_column_div, .responsive .av_one_fourth.first + .av_one_fourth + .av_one_fourth.flex_column_div, .responsive .av_one_fourth.first + .av_one_fourth + .av_one_fourth + .av_one_fourth.flex_column_div, .responsive .av_one_half.first + .av_one_fourth.el_before_av_one_fourth.flex_column_div, .responsive .av_one_half.first + .av_one_fourth.el_before_av_one_fourth + .av_one_fourth.flex_column_div, .responsive .avia-content-slider-inner .av_one_fourth.flex_column_div {
margin-right: 2%; /* Kriesi: margin-left: 4% */
width: 46%; /* Kriesi: 48% */
float: left;
}
}Hope you are willing to dive in again… Many thanks in advance!
Best regards, Cornelie
October 10, 2021 at 8:48 pm #1324314Hi,
Thank you for your patience and for the login, I changed your css rule fromclear: none;
toclear: both;
now the page shows two columns at laptop width, 1024px
Please see the screenshot in the Private Content area and clear your browser cache and check.Best regards,
MikeOctober 12, 2021 at 7:47 pm #1324640Dear Mike,
thanks a lot for this adaptation of the code. It seems to work now. Great!
Best regards,
CornelieOctober 13, 2021 at 7:33 am #1324685November 2, 2021 at 10:10 am #1327401Dear Rikard and all,
somehow the change from 4 to 2 columns on my tablets still does not work perfectly, since on 3 pages, two of the columns stick in 1/4 mode instead of changing into 1/2. Unfortunately I can’t figure out why.
Could you please have a look at it again? See also my comments in the private field.
Thank you so much!
Best regards, CornelieNovember 3, 2021 at 2:02 pm #1327631Hi,
Thanks for the link. but only two of the pages loaded for me, I did find a rouge empty paragraph tag before the error element but I don’t know were this is coming from. Try adding this code to the end of your functions.php file in Appearance ▸ Editor:function rouge_empty_p_after_one_fourth_column() { ?> <script> (function($){ $(".av_one_fourth.first + .el_after_av_one_fourth + p:empty").remove(); })(jQuery); </script> <?php } add_action('wp_footer', 'rouge_empty_p_after_one_fourth_column');
I believe this will solve but please check your other pages with 1/4 columns to make sure there are no conflicts.
Best regards,
MikeNovember 3, 2021 at 4:42 pm #1327658Dear Mike,
it seems to work on all pages. Thank you so much!
I also don’t know where this rouge empty paragraph tag is coming from, in the Avia Layout Architect everything looks fine to me.Best regards, Cornelie
November 4, 2021 at 12:36 pm #1327776Hi,
Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘100% Column breakpoint’ is closed to new replies.