Ylama Ylama - 1 month ago 6
CSS Question

<p> tag always under background in <div>

So basically i want my p tag to always be displayed under my background image. so if i make my window smaller the p tag should not overlap the background-image. (I know adding it in the source code as a img in a seperate div would help allot, but an answer for this would be nice.)

<div class="champ-link img-background">
<a><p>browse the selection</p></a>
</div>


my css:

.img-background {
background-image: url(test.jpg);
background-repeat: no-repeat;
background-size: 50px 63px;
}

Answer
.img-background {
background-image: url(test.jpg);
background-repeat: no-repeat;
background-size: 50px 63px; 
padding-top: 63px;
}

or

 p {
   margin-top: 63px;
   }
Comments