JElster
asked on
HTML5 - How to center an image
I have the following simple page. Why doesn't my image/logo appear centered?
thx
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>My Page</title>
<style type=”text/css”>
.imgclass
{
background-color:black;
text-align:center;
border: medium ridge #0000FF;
}
.imgclass img
{
margin:auto;
}
img
{
display:block;
}
</style>
</head>
<body style="background-color:bl ack">
<div class="imgclass">
<img alt="" src="LOGO.png"/>
</div>
</body>
</html>
thx
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>My Page</title>
<style type=”text/css”>
.imgclass
{
background-color:black;
text-align:center;
border: medium ridge #0000FF;
}
.imgclass img
{
margin:auto;
}
img
{
display:block;
}
</style>
</head>
<body style="background-color:bl
<div class="imgclass">
<img alt="" src="LOGO.png"/>
</div>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.