Hey,
I have a page which has 2 1/5 columns on it, and I need to center them. Now I know mathematically, this doesn’t really work since you can’t have the same space on the left and right of them, but shouldn’t it be possible to center them using CSS?
Cheers
and it has to be 2 1/5 ! Just a silly question why not 2 1/4
(it is easier to handle)
you can manage the width than via custom class see here : https://webers-testseite.de/ikom/shadow/
i set up 4 1/4th columns and give each a custom class (the columns itself) you see the class inside as heading.
and than i setup a custom width for them ( just a bit maths)
div .av_one_fourth.innen {
width: 15% !important;
}
div .av_one_fourth.aussen {
width: 26% !important;
}
the space between is set by enfold to 6%. so on 3 spaces you have to manage the rest to 82% (or for a pair of “innen” and “aussen” 41%) (26+15)
the normal width for a fifth column is 15.2%. so nearby.
The only thing is you have to make some rules again for responsive case
( on that test page my mobile starts at 990px)
@media only screen and (max-width: 990px) {
div .av_one_fourth.innen {
width: 100% !important;
}
div .av_one_fourth.aussen {
display: none !important;
}
}
you see on that demo page that the 1/3 solution in front works to (if you set it to 26% its perfect)
By the way – on new enfold there is for each column the possibility to set a mobile behavior in options dialog.
Did you try the suggestions posted by @guenni007 and did you have any luck with them?
Thanks for helping out as always Günter :-)
Best regards,
Rikard