HTML - CSS 

How to write Text over Image Using HTML and CSS.

It's very simple , just you need a bit of CSS  coding .

our HTML Code will be Image and text 

<div class="imagestyle">    <img src="Your Image Path" />    <div class="textstyle">You Text</div></div>

as we see in the code first dive is the continner for both of the Image and Text .

CSS code :

.imagestyle {       position: relative;}.textstyle {   position: absolute;   top: 45%;   text-align:center;   width: 100%;   margin: 0 auto;   width: 100%;   height: auto;   color: white;    font-size: 1.6vw;}

 

 

Example :

 



Share

Comments