Relatively Simple CSS Grid question
I want the specific grid-area hero created with grid-template areas to have a fixed size no matter if it sits left or right of the heading.
I have found a solution but I feel like there must be a better way to responsibly manage this.
I provided screenshots of the issue and the code I used cause I think for an expert this is a rather simple question. I'll create a codepen if it's required.
4 Replies
The grid template makes sense to me.
I guess the question mostly revolves around the
auto v.$hero-size
and having to change that for both of them.
The other thing I can think of is to use the v.$hero-size
as the width
of the .round-hero
instead... at least without seeing more anyway. That might not work either, but it's the first thing I'd try.I'm also wondering the same. It seems that using
auto
when specifying the column width cannot be easily overwritten, even when specifying the width using !important
...I have infact put the as the width of but it defaults to the 50 / 50 layout. My idea was that there might be a way to do something like this pseudocode that would set the the grid-width of the to said value no matter where it is positioned. But since this is a niche use case I don't think it exists.
In anyway thanks a lot for your content kevin. I learn a lot from your videos/shorts even those was heavily inspired by you :)
Oh sorry I messed up there, I was supposed to inline-tag that
Important follow up question, how do I tag this as solved on the phone?
In the channel list to the left, hold on the topic name and click edit tags