apply a class on based of scroll using only css

I have navbar with a width of 800px , when scroll happen I want that navbar take full width of the viewport. This task have to done using only css. is that possible ?
3 Replies
get out...!
get out...!OP2y ago
@Kevin
Jochem
Jochem2y ago
@get out...! please review the rules, pinging people randomly is against the rules, and so is pinging the mods or Kevin without a good reason to answer your question, I'm pretty sure that's not possible. maybe you could hide a second navbar underneath other elements at the top, and set it to position: fixed, but it'll depend on your layout if that's feasible basically this is much better solved with Javascript
get out...!
get out...!OP2y ago
I am so sorry for do that
Want results from more Discord servers?
Add your server