hidrau
asked on
What is the better way to center a image in a div?
Hello friends:
After looking for some example, I got this one:
is the better way to center ( vertical and horizontal) the image in my div?
Regards
Alex
After looking for some example, I got this one:
<html>
<head>
</head>
<style>
body {background-color:white}
div {background-color:cyan; border: 1px solid black; height:200px; width:200px; display:table-cell; vertical-align:middle; text-align:center}
</style>
<body>
<div>
<img src="c:\aguia.jpg" width="50%" height="50%">
</div>
</body>
</html>
is the better way to center ( vertical and horizontal) the image in my div?
Regards
Alex
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER