You are on page 1of 6

How to add Logo on top

of an Image using HTML


and CSS
<div class="container">
<img
src="https://images.unsplash.com/photo-
1668696381185-46c77ee52d1a?ixlib=rb-
4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx
8fGVufDB8fHx8&auto=format&fit=crop&w=1169&
q=80" alt="Norway"
style="width:100%;height:100%;object-
fit:cover;">
<div class="text-block">
<img class="imgTweet"
src="https://media.licdn.com/dms/image/D56
03AQGlAKg3-wYJfQ/profile-displayphoto-
shrink_100_100/0/1673881422308?
e=1679529600&v=beta&t=bcdCh-
yjnK28gpIGGraGWMfGuIxV8lJQkahA0wts5vk" />
</div>
</div>
.container {
position: relative;
height:600px;
}
.text-block {
color: white;
}
.imgTweet{
position: absolute;
bottom: 50px;
right: 50px;
height:auto;
width:120px;
border-radius: 10px;
}
@media (max-width:600px){
.imgTweet{
width:80px;
height:auto;
bottom:30px;
right:30px;
}
}
For full code.
https://codepen.io/jeevankaree/pen/VwdrRwN

You might also like