I'm facing an issue where the text in the h1 tag overflows the div container when viewed on a tablet or mobile device. Can someone please assist me with resolving this problem? Here is how it appears in regular windows
This is the result when I shrink the window
Below is the code snippet:
.chicken {
width: 30%;
float: left;
background-color: #AAAAAA;
padding: 10px;
border: 3px solid black;
box-sizing: border-box;
margin-left: 40px;
position: relative;
}
.chickenh {
background-color: hotpink;
font-size: 20px;
display: inline;
position: relative;
left: 260px;
padding: 10px;
text-align: right;
border: 3px solid black;
box-sizing: border-box;
padding-left: 20px;
}
.chicken-info {
font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
font-size: 17px;
font-weight: bold;
position: relative;
}
<body>
<div class="chicken">
<h1 class="chickenh">
CHICKEN
</h1>
<p class="chicken-info">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.Duis aute irure dolor
in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
</p>
</div>
</body>