I am having issues with getting text to display over an image. There are four images total, and have them arranged in a cross like arrangement, and from the top each rotated 90 degrees from the previous image. What I am trying to do is have the text on top of the image. So far the text is on the left of the screen and not over an image.
This is the arrangement of the images. I would like to see if I can get the text over each image as well as rotate the text 90 degrees per image.
body {
background-color:black;
font-family: Verdana, Arial, Helvetica, sans-serif;
margin: 0;
}
h2 {
color: white;
position: absolute;
top: 200px;
left: 0;
width: 100%;
}
.square {
/* background: black; */
height: 100vh;
width: 100vh;
margin: auto;
}
.rotate180 {
-webkit-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-ms-transform: rotate(180deg);
-o-transform: rotate(180deg);
transform: rotate(180deg);
}
.rotate90 {
-webkit-transform: rotate(90deg);
-moz-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
}
.rotate270 {
-webkit-transform: rotate(270deg);
-moz-transform: rotate(270deg);
-ms-transform: rotate(270deg);
-o-transform: rotate(270deg);
transform: rotate(270deg);
}
.square div,
.square img {
float: left;
width: 33.3333vh;
height: 33.3333vh;
}
<div class="square">
<div></div>
<img src="http://dummyimage.com/520&text=6.gif" alt="test" height="520" width="520">
<h2>Test Text</h2>
<div></div>
<img src="http://dummyimage.com/520&text=3.gif" alt="test" height="520" width="520" class="rotate270">
<h2>Test Text</h2>
<div></div>
<img src="http://dummyimage.com/520&text=4.gif" alt="test" height="520" width="520" class="rotate90">
<h2>Test Text</h2>
<div></div>
<img src="http://dummyimage.com/520&text=8.gif" alt="test" height="520" width="520" class="rotate180">
<h2>Test Text</h2>
<div></div>
</div>