+ 2
How to place any object at the centre of the page in CSS?Please help
6 Answers
+ 4
if you only have the object in the body of the webpage you can do:
body {
display: flex;
min-height: 100vh;
}
and your object: margin: auto;
+ 4
you can do this:
position: absolute;
top: 50%;
left: 50%;
transform:
translate(-50%,-50%);
+ 3
For positioning in center use margin:auto
+ 1
you can place image in centre using
<img src="xyz.jpg"class="mx-auto d-block"
0
Please answer fast!
0
I want to place a CSS generated circle to the center of page.How to do it??