@mdajmalshadab
Posted
Hey Great Work! Regarding those breakpoints I would recommend using background-image
CSS property inside your main
container, and then accordingly position your background using background-position
property to match the desired layout.
@erelropeta
Posted
@mdajmalshadab Hello! :) I initially started with that using pseudo-elements to place the two circles, but I find it hard to position them. Sometimes the background-position worked then sometimes the circles won't just update their position π
I'll try it again :)
@mdajmalshadab
Posted
@erelita Actually I learned that concept recently (after completing the profile card challenge), in my profile card challenge I used the follwoing properties for the background.
.bg { margin: 0; display: flex; justify-content: center; position: relative; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.bg-img-1 { position: absolute; right: 52%; bottom: 40%; }
.bg-img-2 { position: absolute; left: 50%; top: 50%; }
Hope this helps, else you can have a peek on my code to understand better. GitHub-Link
Marked as helpful
@erelropeta
Posted
@mdajmalshadab I tried the ::after and ::before pseudo-elements because I enjoyed using them on cssbattle.dev βΊοΈ Then I found it hard to get the right positions π
I'll try to do this again after doing the accordion. Thank you so much!
@mdajmalshadab
Posted
@erelita great! Keep coding π