Archived topic
Footer widgets tablet width
7 replies · Started by Kevin on July 16, 2020
By default, footer widgets are 50/50 widths on tablets.
I want 33/33/33 widhts on tablet.
Using, the following code, the widgets stack vertically on tablet instead of 33/33/33.
What am I doing wrong?
// DESKTOP
add_filter( 'generate_footer_widget_1_width', function() {
return '45';
} );
add_filter( 'generate_footer_widget_2_width', function() {
return '30';
} );
add_filter( 'generate_footer_widget_3_width', function() {
return '25';
} );
// TABLET
add_filter( 'generate_footer_widget_1_tablet_width', function() {
return '33';
} );
add_filter( 'generate_footer_widget_2_tablet_width', function() {
return '33';
} );
add_filter( 'generate_footer_widget_3_tablet_width', function() {
return '33';
} );
Hi there,
I assume you are talking about portrait mode?
Does landscape mode work correctly?
I am referring to tablet as any width between 769 pixels - 1024 pixels.
It does work > 1024 pixels.
Thanks.
Hi there,
Seems to be a bug with our combined CSS version, which uses a slimmed-down version of the grid system.
Try this CSS:
@media (max-width: 1024px) and (min-width: 768px) {
.tablet-grid-33,
.active-footer-widgets-3 .footer-widget-3 {
width: 33.333%;
float: left;
}
.inside-footer-widgets>div:nth-child(odd) {
clear: none;
}
}
Thank you.
I'd prefer to use the filter is possible - any idea when a patch may be released?
I added the CSS you provided to the Simple CSS plugin but it is not changing anything. I am still seeing 2 columns between 769px - 1024px.
The next version of GeneratePress will actually be moving away from the float system, so those filters will no longer work anyways (for new installations).
However, you can tell GP not to use the combined CSS file in Customize > General. That way the full unsemantic-grid CSS will load, which will include that class the filter uses.
thanks
No problem :)