0

How can I fix this position

https://www.geeksforgeeks.org/how-to-create-analog-clock-using-html-css-and-javascript/ I just added this code to my website but it just sits in middle of my site. How can I take it to top right corner or moves with page while it goes down .

8th May 2022, 7:03 PM
Lalala
Lalala - avatar
2 Antworten
+ 1
You just need to remove selector margin: auto; from #clockContainer it would set to corner by default. Or you can set the element by position #clockContainer { position: absolute; top: 0; left: 0; }
8th May 2022, 11:23 PM
Calviղ
Calviղ - avatar
0
This could help you You could try position:fixed; to scroll with the site. https://www.sololearn.com/learn/CSS/1114/?ref=app
8th May 2022, 7:18 PM
Stefanoo
Stefanoo - avatar