+ 1
Problems with the divs
I want to get the div with the class “foto” in the center, but i cant get it, i tried some stuff like the display and the float but those didnt fix my problem, what can i do? https://code.sololearn.com/WA23A3a112a1/?ref=app
5 ответов
0
Try this:
.foto {
position: absolute;
margin: auto;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
+ 1
There are many ways to this.
+ 1
Make the width and height of the element fit for all devices. Don't try to make the page to scroll in X axis
+ 1
Coder-Rohit[{(∞)}] yeah, thanks, i’ll try to make it responsive later, thanks for the help!
0
U need to make container in the body first. If u want to use margin auto, u need to make any width in the container. U havent container, so if u make width for body, u can make your divs center. """"Need a width first""""