I am encountering difficulties attempting to replicate a full-width rectangle div on a website, particularly with issues related to responsiveness and mobility.
Here is an example of the design I am trying to recreate.
And here's what I've accomplished so far: example here.
The primary issue I'm facing is that the text does not fit inside the designated boxes as intended, especially when viewed on mobile devices.
Below is a snippet of my current HTML and CSS:
HTML
<div class="row remove-container">
<div class="speech-bubble1 test-text">
<div class="row">
<h3 class="strong-text felinetitle">ADD</h3>
</div>
<div class="row">
<ul id="feline-ul">
<li>
<h6>Heartworm Test</h6>
</li>
<li>
<h6>$25</h6>
</li>
</ul>
</div>
</div>
<div class="speech-bubble speech-bubble-top">
<div class="container" style="padding-top: 35px; padding-bottom: 35px;">
<h3 class="strong-text felinetitle2">
A LA CARTE </h3>
<div class="row">
<div class="col-lg-9">
</div>
<div class="col-lg-4">
<div class="row">
<div class="col-sm-6">
DHPP or DHLPP
</div>
<div class="col-sm-6">
Canine Flu
</div>
</div>
</div>
</div>
</div>
</div>
</div>
CSS
.speech-bubble {
position: relative;
background-color: #045faf;
width: 100%;
height: 150px;
color: white;
text-align: center;
font-family: sans-serif;
}
.speech-bubble1 {
position: absolute;
background-color: #045faf;
width: 32%;
height: 150px;
left: 0;
color: white;
text-align: center;
z-index: 1;
font-family: sans-serif;
}
.remove-container {
margin: 0 !important;
padding: 0 !important;
}
.serviceprice {
display: flex;
justify-content: center;
padding-top: 50px;
}
#feline-ul{
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
}
#feline-ul li{
float: left;
margin-left: 70px;
}
.test-text{
webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-ms-flex-direction: column;
flex-direction: column;
-webkit-box-shadow: 18px 0px 35px -23px rgba(0,0,0,0.52);
box-shadow: 18px 0px 35px -23px rgba(0,0,0,0.52);
}
The problem arises in the second box where my texts do not align properly within a square/container, instead occupying full width.