@slothmast3r
Posted
Hi. Congrats on your second challenge!
.main-container .image-card div{
...
top: 60;
...
}
you forgot to use any units on top attribute. what i recommend is using position: relative
on parent class and position: absolute
on child.
Please avoid using *{...}
it makes code unreadable.
Add some animations to make it look cooler
Good luck!
Marked as helpful
@darthTh0t
Posted
Hi @slothmast3r, thank you so much. I have followed tutorials where *{...}
was used extensively. I will make sure not to include this line in the future.
And definitely more thank you for noticing the error.
@slothmast3r
Posted
@arnav-sahoo okay sorry my bad, i didnt look in to your code that much 😅. In this case margin:0
and padding: 0
is reasonable.
*{
margin: 0;
padding: 0;
}
but in other cases you should be careful.
Just to be clear what i meant with positions
<div class="parent">
<div class="child">
<div />
<div />
.parent{
position: relative;
}
.child{
position: absolute;
top: 0;
}
it positions child relative to parent div.