text over image responsive css

Solutions on MaxInterview for text over image responsive css by the best coders in the world

showing results for - "text over image responsive css"
Alexis
20 Sep 2020
1<!DOCTYPE html>
2<html>
3<head>
4	<meta charset="utf-8">
5	<title></title>
6	<style >
7		.container
8		{
9			position: relative;
10			text-align: center;
11			color: white;
12		}
13		.center
14		{
15			position: absolute;
16			top: 50%;
17			left: 50%;
18			transform: translate(-50%, -50%);
19		}
20		img 
21		{
22			display: inline;
23		}
24	</style>
25</head>
26<body> <div class="contain">
27<img src="https://helpx.adobe.com/content/dam/help/en/photoshop/using/convert-color-image-black-white/jcr_content/main-pars/before_and_after/image-before/Landscape-Color.jpg" style="width: 100%;">
28<div class="center"> AHSDHHDD dolor sit amet, consectetur adipisicing elit, sed do eiusmod
29tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
30quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
31consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
32cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
33proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
34</div>
35
36</div>
37</body>
38</html>