-
WebGeek
Hi there,
I have a two column grid that is by default 50:50 width. I used to be able to change the size of the containers (eg 40% 60%) and that would work but now when I specify the size % it becomes 40% of the original 50%.How can I set the two column to a 40:60 ratio?
Thanks.
-
Hi there,
Set the container’s display to grid, and set
grid-template-columnsto2fr 3fr. -
WebGeek
Like in the attached.
This didn’t do anything so maybe I did something wrong.
-
Alvind
Hi there,
You placed
2fr 3frin the Grid Template Rows field — it should be in the Grid Template Columns field instead. -
WebGeek
Oh, I see, right.
Unfortunately, that hasn’t worked either. Actually, it worked in the page editor but hasn’t worked on the frontend, despite clearing every cache I can think of and trying multiple browsers and through a VPN.
-
Alvind
Can you share the URL so we can inspect what might be causing the issue?
-
WebGeek
I had built the block as an element. I’ve found that if I copy and paste the block directly into the page (removing the element), it loads correctly but when I load into the page as an element it doesn’t respond to those updates.
Is there some kind of caching related to Elements?
-
Alvind
There isn’t any dedicated caching mechanism applied to Elements — they’re simply custom post types, just like regular pages.
It’s possible that the block’s stylesheet isn’t being enqueued within the Element, but I can’t confirm that without inspecting the site directly.
- You must be logged in to reply to this topic.