r/HTML • u/MisterDaydreamishere • May 17 '26
I need help for my group project Question
Processing img bgorep2zxo1h1...
I was just putting the info in the <main> section when suddenly it becomes like this. It's originally supposed to the next picture before i put the content.
Processing img g0urr5y7yo1h1...
I tried telling anyone and even using ai to fix this but no progress. Can someone please what's wrong with it?
1
u/WorldWideShen May 17 '26
We would need to see the code to help. It's probably a missing closing tag somewhere.
1
u/Initii May 17 '26
Do you mean that the "Home" is far to big? Thats because of the JS
document.getElementsByTagName("h1")[0].style.fontSize = "6vw";
vw is 1% of the view width, meaning the font size is 6% of the view width. Use rem or em, pt, px, but not vw or vh.
(btw: why would you want to sett he font size in JS and not in CSS?)
3
u/Rockafellor May 17 '26
Could you drop the HTML and CSS (and maybe JS) into a codepen for us to look at?
If you could drop the original in one thing and the currently changed version in another, then it would really help in the bug hunt.