I am having problems with getting a container to stay as I have set them.
I have also tried various text-wraps without success.
I have tried all sorts of stuf in an attempt to sort this mproblem out. I discovered that is easier to ride a motorbike with chocolate handlebars in the desert!
The problem occurs when text needs to be wrapped. I’m not sure if it’s becuase the text is part of a UL list. (hopefully, i’ve been able to attach 2 screen prints.
one shows the set up how it should be, The other with the added text.
is there a way to fix this?
CSS code
grid-container3 {
display: grid;
grid-template-columns: 50% 50%;
grid-column-gap: 20px;
/* background-color: (255,90,205,0.1); */
width: 50% 50%;
padding: 10px;
place-items: center;
box-shadow: 5px 5px rgba(0, 0, 0, 0.1);
}
.grid-item4 {
font-family: 'Roboto', sans-serif;
font-size: 1.00rem;
place-items:center;
text-wrap:stable;
}
HTML Code
<div class="grid-container2">
<div class="grid-item3">
<div class="herobox1">
<h2> Book by 31st May 2024 and Get a 15% Discount</h2>
<img src="hop-mad.jpg">
</div>
</div>
</div>
<div class="grid-container3">
<div class="grid-item4">
<h3>Energy Performance Certificate - EPC</h3>
<p><b>Some reasons as to why you need an EPC:</b> </p>
<ul>
<li>For selling Sell your home or a domestic property</li>
<li>For renting out a domestic property</li>
<li>For renewing or updating your existing certificate</li>
<li>For finding out how to reduce your carbon footprint</li>
<li>For a Trustmark Gaurantee for the efficiency of the
<br>energy saving schemes recommended inyour EPC</li>
</ul>
</div>
In this print: I have used text wrap but it has pushed the grid to the left.
in this view: I have used a
. It has kept the grids in place but the text is much narrower than 50% (width of a grid). It does slightly stick out to the right as well.