I am currently centring an image in the horizontal using:
.centeredImage
{
text-align:center;
display:block;
}
<!DOCTYPE html>
<html>
<head>
<title>My Site</title>
<link href="style.css" rel="stylesheet">
</head>
<body>
<p class="centeredImage"><img id ="img" src="smallslide1.png"></p>
</body>
</html>
This works fine but I want to centre it vertically too. Not sure how to do about this. I tired to wrap it in a separate div
.centeredVert{
vertical-align: middle }
}
but this didn't do anything. could someone give me some pointers on how to do this please?