+ 1
IMAGES
I am having a hard time centering my images in HTML. Does anyone know how to do that?
1 Réponse
+ 1
do this, applies for all no matter what.
suppose you have a div element or image or something with id = "container" and width(that you'll define) as x;
so the CSS will be
#container {
position:relative;
left:calc(50% - (x/2)px);
}
don't use the x/2 as I used just add the numerical value.