I currently have the following html.
<div id="img_preview_text_container" style="position: absolute; top: 156px; left: 50px; font-family: Oklahoma; width: 376px; height: 75px; color: rgb(255, 0, 0);">
<div class="customOnePreviewText">ASDF</div>
</div>
The css for .customOnePreviewText
is:
.customOnePreviewText {
margin: 0;
position: absolute;
top: 50%;
-ms-transform: translateY(-50%);
transform: translateY(-50%);
font-size: 48px;
}
The challenge I'm having is that the text appears in the upper part of the div. I'd like the type to be centered in the div meaning not a bottom part off or the entire div to just be the size of the text. This is what I have now.
the black area is the div highlighted.