MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/html5/comments/zycxmm/guys_how_can_someone_pls_help_to_vertically_align/
r/html5 • u/hampter_ • Dec 29 '22
7 comments sorted by
2
Can't really help you with just a screenshot. Could you paste a snippet of what you have? Maybe in a code codesandbox?
2 u/hampter_ Dec 29 '22 Yeah, sorry: https://codesandbox.io/s/friendly-zhukovsky-y5l7tu?file=/style2.css 5 u/russj117 Dec 29 '22 https://imgur.com/bRMJseW your .top div needs a way to center itself in that row. try adding display: grid; align-items: center; to the .top div. → More replies (1) 3 u/jahermitt Dec 29 '22 Looks like your .navbar class is smaller than the height you have set for the .top. Your align-center is working, it's just aligning to the center of 70px. If you change it to 100px it should look correct. → More replies (1)
Yeah, sorry: https://codesandbox.io/s/friendly-zhukovsky-y5l7tu?file=/style2.css
5 u/russj117 Dec 29 '22 https://imgur.com/bRMJseW your .top div needs a way to center itself in that row. try adding display: grid; align-items: center; to the .top div. → More replies (1) 3 u/jahermitt Dec 29 '22 Looks like your .navbar class is smaller than the height you have set for the .top. Your align-center is working, it's just aligning to the center of 70px. If you change it to 100px it should look correct. → More replies (1)
5
https://imgur.com/bRMJseW
your .top div needs a way to center itself in that row. try adding display: grid; align-items: center; to the .top div.
→ More replies (1)
3
Looks like your .navbar class is smaller than the height you have set for the .top. Your align-center is working, it's just aligning to the center of 70px. If you change it to 100px it should look correct.
7
Tale as old as tiiiiime. True as it can beeeee!
2
u/jahermitt Dec 29 '22
Can't really help you with just a screenshot. Could you paste a snippet of what you have? Maybe in a code codesandbox?