How to format the <li>
element
HTML:
<div id="patTest" style="width: 95%; padding: 0; margin: 0; text-align: center;">
<ul id="patTestUL">
<li>
<div style="padding: 0; margin: 0; width: 98%;">
<span style="background: #00ff00; width: 20%; text-align: right;"><img src="theImages/leftQuote.png" alt="Quote" style="width: 30px; height: 30px; padding-right: 10px;" /></span>
<span style="color: #000000; background: #FF0000; width: 76%;">The art duo of Gilbert and George on how their work can ruffle feathers and the benefits of routine.</span>
</div>
</li>
<li>
<div style="padding: 0; margin: 0; width: 98%;">
<span style="background: #00ff00; width: 20%; text-align: right;"><img src="theImages/leftQuote.png" alt="Quote" style="width: 30px; height: 30px; padding-right: 10px;" /></span>
<span style="color: #000000; background: #FF0000; width: 76%;">The art duo of Gilbert and George on how their work can ruffle feathers and the benefits of routine.</span>
</div>
</li>
...
</ul>
</div>
</div>
CSS:
<style>
#patTestUL li {
display: flex;
justify-content: space-evenly;
}
.green-bg span {
background: #00ff00;
color: white;
padding: 5px;
}
.red-bg span {
background: #FF0000;
color: black;
padding: 5px;
}
</style>
This code snippet will now present the green and red sections separated and centered like this: