fix before and fix positioning
I want a fix position and a before/after
tho the fixed posiotion need to be above the after and before?
i search and it said i couldnt and i had to go for the changing the some css in before and parent
but i dont really want it! so is there anything else
both are fixed tho the before can be anything but i want it before the damn parent
14 Replies
If I understand your question correctly, you can do it with grid.
position : fixed i meant
not the class
still tnx for being nice
i know, it's just as example
but i dont want a grid either
assume i wanna put the before behind the main one
with a bit bigger backscreen so it shows it self like a border tho it will appear forward since the parent is a fix not relative
for better seeing it go and make the red on inset 0
and the green and blue smaller with position fixed / absoloute now try to push them behind the main/red
please show a drawing of what you want to acchieve + the mark up. It's not really clear to me
ok wait i can make it
div{
position: fixed; overflow-y: scroll; background: blue; inset: 10%;} div::after{ content:''; any position any condition background:black; i want it as a border so = inset: 15%; } just make the black one go behind simplest form
position: fixed; overflow-y: scroll; background: blue; inset: 10%;} div::after{ content:''; any position any condition background:black; i want it as a border so = inset: 15%; } just make the black one go behind simplest form
but the blue will cover the black if it goes behind. what's the purpose? Can you mock up a design, there might be an easier way to what you want. I bit more context pls
now try to put the fix in the first position (main one)
now try to push it backwars
yea, that wont work. but there might be other options
for example, a single element without pseudo
https://codepen.io/MarkBoots/pen/RwXJayZ
yea dont want this need both and it is urgent to both be there perferably the same order
cause im trying the suggested on stackoverflow and I encounter a problem with scroll
so yea mine is not a good idea
well it isnt after the pink is after and the behind is the parent