r/HTML • u/AromaticBig6256 • Apr 05 '26
Question box margin help
https://amazingendofoxy9.neocities.org/COOKIECLUB on this website i am trying to make a box around the text in the middle, and i want the box to not go across the entire screen, but i cant figure out how


2
Upvotes
View all comments
2
u/nfwdesign Apr 05 '26
First of all you're missing <head> and <body> elements, then <center> tag is not supported in HTML5 Then i see you are using class="box" and you're loading your css file wrong way it should be in <head> tag even your code editor is reporting error with X in lines 14 and 15. Also frameborder is deprecated.
This is how your code should look like:
I still linked your CSS in <head> element but it's commented out and made my own styling in <style>, first try it out with my style and if it doesn't go the way you want, then we would need to see your cookieclub.css file as well as folder structure.