I want to achieve this. Keep an eye on the top text 'Happy Fruit'. I want to be overlayed of the box while it's nested inside it.
body {
background: yellow;
padding: 50px;
}
.slider {
width: 100%;
height: 650px;
margin-top: 40px;
background: orange;
box-shadow: 0 0 78px 11px #F3286B;
}
h1, h2 {
text-transform:uppercase;
color: red;
}
h1 {
font-size: 11vw;
}
h2 {
font-size: 7vw;
}
<body>
<div class="slider">
<h1>
Happy Fruit
</h1>
<h2>
HELLO WORLD
</h2>
</div>
</body>
If I then go and add a margin-top: -50px; to the h1 the text will stay inside the div, but how can I make it going above/standing on it on it while it's still being nested inside (html)? I've tried playing with z-index but that didn't work.
position: relative; top: -50px;
