I have a fantastic sticky aside working in Shadows but now I'm trying to do the same exact thing in Colossus and it does not work. Why?
Announcement
Collapse
No announcement yet.
Sticky Aside
Collapse
X
-
Sticky Aside
Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Tags: None
-
Try adding the class o-layout--align-top (align-items: flex-start;) to the parent element.Nick Harkins
www.loveisarose.com
-
It looks like that css (align-items: flex-start;) is already assigned to the class o-layout--column-reverse in Shadows, so that is why it works in Shadows and not Colossus.Last edited by SidFeyDesigns; 06-19-23, 09:31 AM.Nick Harkins
www.loveisarose.com
Comment
-
Originally posted by SidFeyDesigns View PostIt looks like that css (align-items: flex-start;) is already assigned to the class o-layout--column-reverse so that is why it works in Shadows and not Colossus.
Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
Comment
-
Exatcly, that is why it's not working.
If you're afraid of breaking things or causing layout issues by editing the o-layout--column-reverse class in Colossus, just add the class that is already built into Colossus (o-layout--align-top) to the direct parent element of the aside and you should be fine. (As I had suggested in my first post.)
Just make a note to self that the class will be needed on parent elements when using position sticky.Nick Harkins
www.loveisarose.com
Comment
-
The way "display: flex" works is the main reason this isn't working as is with Colossus.
The default value of "align-items" is "stretch" if it is not declared otherwise in the css.
This means the two child elements on the same row will have the same height even if the content doesn't fill the height of one of them. This actually negates position sticky since both child elements have the same hieght.
There is some great info on align-items here: https://developer.mozilla.org/en-US/...the_cross_axisLast edited by SidFeyDesigns; 06-19-23, 09:29 AM.Nick Harkins
www.loveisarose.com
Comment
-
OMG - that was the missing piece of the puzzle. THANK YOU!!!Leslie Kirk
Miva Certified Developer
Miva Merchant Specialist since 1997
Previously of Webs Your Way (aka Leslie Nord leslienord)
Email me: [email protected]
www.lesliekirk.com
Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr
- 1 like
Comment
Comment