+ 1
Div position
I want to be able to position a div somewhere on my page but in the course here they teach by pixels but the problem is that thats only for my device but all other devices have other pixel amounts so it will be in another place on the screen! Can someone give me a suggestion how to make it so it’s in the same place on all devices?
5 odpowiedzi
+ 1
estifanos yeah but lets say I want it on te top right corner what do I do?
+ 1
You can use css
top:0;
right:0;
position:absolute;
Search more on google about css positioning.(fixed, absolute, relative, sticky)
0
you can easily give a percentage
like this
<div width="50%">
0
Use this for top right corner
Margin-top: -10px;
Margin-left : -10px;
https://code.sololearn.com/WvJ1L32694of/?ref=app
0
Position fixed or sticky may work for you and position them with pixels and they will appear at same pixels every device