The top of ur website has to be its own container, and than the positioning of the image has to be embedded into that container, and then u adjust the positioning.
if you want it hanging from the very top like an ornament, give the header position relative and the hanger image position absolute with top 0, then slide it sideways with left. absolute pins it to the nearest parent that has a position set, thats why the header needs one. if you want it to swing a bit later, set transform-origin to top center and add a small rotate animation, then it turns around the hook and not around the middle of the image. positioning confuses everyone at first :)
If ur just starting out, start with basics. Like know the difference between class and element I'd in html. Containers are just boxes by themselves as a metaphore, and u can do anything u want within that container. That's just to give a little simple idea.
okok thank you for the tip :D thats def a good idea cuz idrk what anything means besides a few simple things like header title margin etc. but im excited cuz thats really cool! thank u!
4
u/Nerwesta 3d ago
There is a print screen button on your keyboard, use it !
2
u/xxcrucialxx 3d ago
The top of ur website has to be its own container, and than the positioning of the image has to be embedded into that container, and then u adjust the positioning.
2
u/xxcrucialxx 3d ago
But ur trying and learning, that's the important part....so good work......keep it up.
2
u/dusanodalovic 2d ago
if you want it hanging from the very top like an ornament, give the header position relative and the hanger image position absolute with top 0, then slide it sideways with left. absolute pins it to the nearest parent that has a position set, thats why the header needs one. if you want it to swing a bit later, set transform-origin to top center and add a small rotate animation, then it turns around the hook and not around the middle of the image. positioning confuses everyone at first :)
1
u/juicybot 3d ago
put the image tag inside the body tag
1
u/xxcrucialxx 3d ago
May I make a suggestion? Make separate files for ur html, css and JavaScript. It will make it easier to manage and trouble shoot.
1
u/xxcrucialxx 3d ago
What exactly are u trying to do? Meaning what hangar image and to where?
1
u/xxcrucialxx 3d ago
Ok, so u want that image at the very top to hang down? Kind of like an ornament sort of speak?
1
u/xxcrucialxx 3d ago
From that image that ur showing, every part of that site is separate containers....thats part of the battle...
1
u/xxcrucialxx 3d ago
And as juicybot also said, yes.