After I've added <!DOCTYPE html>, everything became buggy

Please, can someone help me on codepen? I'd like to learn how to fix this problem and to fix my website. I'm working on this uni project and I'm making a website. I forgot to put the <!DOCTYPE html>, but after i've added it, everuthing became buggy, like, the background image it's too big or too little and repeats itself, the buttons are bugged, when I click one, everything on the screen moves down, I've tried to work on the dimensions of the css elements, but nothing changes
3 Replies
Jochem
Jochem5mo ago
share your codepen, then maybe someone will/can take a look keep in mind though, people here volunteer their time so you may not get a response for a while like I said in your other post: not having the doctype triggers quirks mode, which makes the browser behave differently
EIO
EIO5mo ago
In codepen, you don't add that part of the code to your html file. If you trace the error following the red dot, you'd see that you're meant to type in only what is within the <body></body> into your html "file"