+ 11

I need help in this code...

Link to the code: https://code.sololearn.com/W8HWsTpE6PqS I want to align the heading vertically center but it's not happening(I used flexbox for the purpose). Can anyone tell me the error in it?

4th Apr 2017, 4:08 AM
Chirag Bhansali
Chirag Bhansali - avatar
5 Respostas
+ 15
Error solved. I just removed the div tag as it was kinda feeling like some extra stuff. Then I specified the height of section tag that is-height="100%". Then in CSS, in .home h1, {vertical-align:middle;}. https://code.sololearn.com/W9t8B5Aon8XB/?ref=app
4th Apr 2017, 4:34 AM
Biraj Patel
+ 11
Thanks guys
4th Apr 2017, 8:21 AM
Chirag Bhansali
Chirag Bhansali - avatar
+ 6
@chirag add below CSS in addition to what you have .name h1{ margin:auto } .name{ height:100%; width:100%; } It should solve your problem.
4th Apr 2017, 6:35 AM
Ashwani Kumar
Ashwani Kumar - avatar
+ 2
Check if the results of what i commented are good for you.
4th Apr 2017, 4:23 AM
Welliton Malta
Welliton Malta - avatar
+ 1
The h1 is already vertically aligned s: Try to increase the height of the div in order to see the difference. You might want to add something like this to your CSS code: .home, .name{ height:100%; }
4th Apr 2017, 4:31 AM
Luca Garrera