Need help with HTML and CSS
I am making a website. When I'm adding the <form> tag, it changes the complete layout of the webpage. Can you say why?
Here's the code: HTML: <!DOCTYPE html> <html> <head> <title> Login or Sign up </title> <meta charset = "UTF-8"> <meta name = "author" content = "harsha"> <link rel="stylesheet" type="text/css" href="Style.css"> </head> <body> <div class = "header"> <img src="VW.jpg" alt = "logo" height = "80px" width = "100px"/> <div class = "header-content"> <h1>The leading manufacturer of German made cars all over the world</h1> </div> <span class = "caption">Volkswagen..Das Auto</span> </div> <div class = "options"> <ul> <li> <a href="#">Home</a> </li> <li> <a href="#">About</a> </li> <li> <a href="#">Contact Us</a> </li> <li> <a href="#">Help</a> </li> </ul> </div> <div class = "content"> <input type ="text" placeholder="Enter your e-Mail or Contact Number"/> <br> <input type = "password" placeholder="Enter your password."/> </div> <div class = "footer"> © This website is subjected to copy and use by the other resellers. </div> </body> </html> CSS: body { margin: 0px; padding: 0px; } .header { width:100%; height: 100px; padding-top: 15px; box-shadow: 0 0.15em 0.35em 0 rgba(0,0,0,0.135); border-bottom: 1px solid #ccc; -webkit-box-shadow: 0 0.15em 0.35em 0 rgba(0,0,0,0.135); -moz-box-shadow: 0 0.15em 0.35em 0 rgba(0,0,0,0.135); -ms-box-shadow: 0 0.15em 0.35em 0 rgba(0,0,0,0.135); padding-bottom: 10px; } li { display: inline; font-size: 15px; margin: 50px; text-transform: uppercase; font-family: 'Raleway', sans-serif; letter-spacing: 2px; } .footer { text-align: center; width: 100%; } .header-content { float: right; margin-right:150px; text-align: center; } img { margin-left: 50px; } .caption { margin-left: 30px; } .options { height: 50px; width : 100%; background-color: black; color: white; } ul { margin: 5px 0px 0px 50px; text-align: center; padding-top: 15px; } a { text-decoration: none; color: white; } .content { height: 500px; width: 100%; margin-top: 100px; } .left-form { margin-top: 100px; }
I am adding the <form> tag before the input tag and right after the "content" div
@Compassionate @wio @bibby @TheSmartOne @nincompoop
@poopsiedoodle @wio @e.mccormick should be able to help you :)
what exactly is it supposed to look like without the form tag? also, this is a tad bit unrelated, but if you're using the HTML5 declaration, why not use HTML5 tags?
Update: I put the form tag in and compared it to the page with the form tag not included, and it looks exactly the same.
Join our real-time social learning platform and learn together with your friends!