I used transform: translateY() to vertically center my div, is there a standard way to vertically and horizontally center divs?
RiccardoSc
@RiccardocodeAll comments
- @CelineTrannSubmitted over 1 year ago@RiccardocodePosted over 1 year ago
Hi, Nice solution! I never have thought about using the translation to center a div!
I'm personally using the display:flex; flex-direction:column; align-items:center; justify-content:center; usually with a combination of the attribute above I get the elements aligned. here for more details: https://www.w3schools.com/css/css3_flexbox_container.asp
Happy Coding!
0 - @AdarshAIR1Submitted over 1 year ago
i was able to implement css properties on this project ,it was a good practice and revison of basic concepts of css and html .
@RiccardocodePosted over 1 year agoHi, Congratulation for the great solution! I've notice that the attribution are at the right side of your content.
I suggest you add the following line to your body tag: flex-direction:column; This will change the direction of your display:flex, having the attribution at the bottom of your QR code block. Additionally, You could use also add gap:20px to give some space between the QR block and the Attribution. Happy coding!
Marked as helpful0 - @waltuh12345Submitted over 1 year ago@RiccardocodePosted over 1 year ago
Hi, great solution! I love the animation you have added for the notification!!
I've notice that the red dot for new notification is missing, here is how I implemented it if it can be helpful for you! Happy coding! HTML: <span class="dot"></span> CSS: .dot { height: 8px; width: 8px; background-color:var(--notification-dot); border-radius: 50%; margin-left: 10px; display: inline-block; }
0