0
how to write any text on image .. in html
8 Respostas
+ 4
Maybe you can insert the image as a background in the container div?
+ 11
This May Help (just using img tag):
https://code.sololearn.com/WNj8A3qalNt0
+ 6
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
+ 6
This is the main things so the position is in the center on the images
+ 5
What do you mean by that? In Canvas or img?
+ 1
this is not working...
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<style>
.container {
position: relative;
text-align: center;
color: white;
}
.text {
position: absolute;
font-family : "serif";
font-size : 50px;
}
</style>
</head>
<body>
<div class="container">
<img src="https://cdnb.artstation.com/p/assets/images/images/005/772/115/large/karthik-jayan-highresscreenshot00000.jpg?1493666317" width="350x" height="150px"/></div>
<div class="text"><h1>
HTML~CSS</h1>
</div>
</body>
</html>
0
over image