@kayleighpeng
Submitted
What is the standard practice for displaying just cards in the center of a page? Specifically referring to HTML elements & structure used to make this happen
@generieyyc
@kayleighpeng
Submitted
What is the standard practice for displaying just cards in the center of a page? Specifically referring to HTML elements & structure used to make this happen
@generieyyc
Posted
Hello! I'm sharing the feedback i got before.
For proper centering the container (whole card) vertically and horizontally, you can use code as:
body { min-height: 100vh; display: grid; place-content: center; }
Hope that helps!
@Alt08
Submitted
with some defects that I can not solve.
I don't know how to apply that purple color to the image.
I appreciate any suggestion.
@generieyyc
Posted
Hello!
I am not sure if this is the right way of doing it but as a workaround for me, I set my main container with the purple background and then set the img opacity to 0.5. Hope it works out for you.
Centering and putting the image aside of the white box, then centering the text in the right-sided white box.
I tried adding Bootstrap coding, but it broke my codes every time. I need more practice.
What do you recommend to do these kinds of positioning and sizing without using so many codes? I really appreciate any help you can provide.
@generieyyc
Posted
Hello! I'm sharing the feedback i got before.
For proper centering the container (whole card) vertically and horizontally, you can use code as:
body { min-height: 100vh; display: grid; place-content: center; }
Hope that helps!
Marked as helpful