Correction required in My Code | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Correction required in My Code

Please help me in correcting this code. I tried and failed now feeling sad. Why there is unwanted gap between header and navigation bar. https://code.sololearn.com/WCHZ0Iw8cjBU/?ref=app

1st Apr 2020, 6:20 PM
Dushyant Kumar Tyagi
Dushyant Kumar Tyagi - avatar
2 Answers
+ 1
Try this in your HTML code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Web lay out 1.</title> </head> <body> <div id="wrapper"> <div id="header"> <div id="logoL"><h2> Logo 1</h2></div> <div id="logoR"><h2> Logo 2</h2></div> <h2>Mission Statement</h2> </div> <!-- HERE I ADDED "MARGIN-TOP: 0" TO THE H1 ELEMENT --> <div id="navbar"><h1 style="margin-top: 0">Navigation Bar</h1></div> <div id="content"> <div id="bannerL"><h5>Banner Left</h5></div> <div id="bannerR"><h1>Place for Article and other contents pertaining to the web page</h1></div> </div> <div id="footer"><h3>Footer for copy right & contact information etc</h3></div> </div> </body> </html>
1st Apr 2020, 6:26 PM
Raúl
0
Thanks a lot. Problem resolved.
1st Apr 2020, 7:01 PM
Dushyant Kumar Tyagi
Dushyant Kumar Tyagi - avatar