I've recently encountered an issue while working on my website. I have a container where I place my page content, but the words were breaking at the end of the container. To fix this, I used white-space: pre;
which stopped the words from breaking, but now the text is not fitting 100% of the container.
You can view the website here: . The text fits perfectly within its container, but the words break at the end of each line. How can I make the text fill the whole container without the words breaking at the end?
HTML:
<div class="mainbox">
<img class="grow-shadow increase leftimage" src="assets/img/bubbles/firstb.png" align="left">
<p class="maintext textchange"><strong>GLOBETROT WITH ARABIC</strong> is your online language classroom that gives you the opportunity to learn the Arabic language through Skype and/or Zoom wherever you are and anytime you wish. Whether you are an adventurer trotting around the globe and exploring its wonders, an entrepreneur seeking flexible learning hours, a fulltime mom/dad, or simply someone who aspires to evolve in the comfort of their home while sipping on warm coffee, this is your chance to finally take on the opportunity of learning the Arabic language with a lot of fun and flexibility and most importantly at your own pace and comfort. You do not need to commit to physical place and space or to a particular time to learn the Arabic language and connect with its culture and people. With Globetrot with Arabic, you can make the most of the increasing space-time compression and cross social and cultural borders. All you need is a phone or a computer, a set of earphones, good Wi-Fi and the enthusiasm to learn the Arabic language and the beautiful culture that comes with it.</p>
</div>
CSS:
.mainbox {
width: 100%;
margin-top: -133px;
}
.leftimage {
width: 350px;
height: auto;
position: relative;
top: 98px;
margin-right: 152px;
margin-bottom: 59px !important;
left: 8.8em;
}
.increase {
display: block;
margin-left: auto;
margin-right: auto;
cursor: pointer;
}
.textchange {
margin-bottom: -11em;
}
.maintext {
word-break: break-all;
font-size: 41px;
padding: 186px;
}
Any assistance would be greatly appreciated!