Shifting next images or changing position with respect to parent div styles
Answered
▄︻デZ̷o̷r̷o̷ ̷O̷P̷╅ posted this in #help-forum
issue-
i am trying to move the svg to right with respect to parent div i did manage to style with respect to parent div using
Expected-
image should move to right side and overflow shold get hidden
i am trying to move the svg to right with respect to parent div i did manage to style with respect to parent div using
image fill
but cant chane the width of imagee and it should have overflow hidden \Expected-
image should move to right side and overflow shold get hidden
Answered by Dayo
i have an idea. since it's a decorative element, you can use it as a background image instead
so, your code will look like:
so, your code will look like:
<div className="bg-[url('/art.svg')] absolute bg-cover bg-right bg-no-repeat"></div>
22 Replies
Atlantic herring
by overflow do u mean z-index?
do u want the text to be on top of the strip?
see the design on the image you will get the idea
Philippine Crocodile
parent has relative?
to is has absolute
beacuase i need that at the end
@Philippine Crocodile
Philippine Crocodile
the element that you want to absolutely position it right to needs to have relative on it
potentially this is some container div or body?
Yus its a position div you can see the code
In img
And also im tryed using relative but it won't work and have same results
Go any solutions!!?
object-position: right
Is that property works?
@Dayo
i have an idea. since it's a decorative element, you can use it as a background image instead
so, your code will look like:
so, your code will look like:
<div className="bg-[url('/art.svg')] absolute bg-cover bg-right bg-no-repeat"></div>
Answer
That good idea i will try it
Actually i can also try out the style tag 😅