for example - I have an image with img{ position: absolute; left:10%; border:10px solid black; height:80%; width:80%; } I want the image in the center no matter if the border is removed or the width of the border has been changed (ignore the borders) .
3/11/2017 9:54:44 AM
Utkαrsh7 Answers
New Answerbox-sizing:border-box; box-sizing:content-box; could help you https://www.w3schools.com/cssref/css3_pr_box-sizing.asp experiment with this on your own, because I know you're pro so I won't tell you everything :)
you can use <center> tag in html by put your image between this tag or you can use margin-left in css to be the image in the center.
استایل بده به عکس <img src="/" style="margin:100px auto 0 auto"> <عکس منبع="/" استایل="فاصله:از بالا از راست از پایین از چپ"> اینم سورس با تحلیل
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message