My code block looks like this:
<?php
if(strpos($page_info[0]['page_title'], 'Service')!==false)
{?>
<img src="<?php echo base_url();?>assets/front_assets/images/service.png" width="450px" height="400px"/>
<br/>
<div style="width:480px; height: auto; border: 1px solid #000; border-radius: 5px; overflow: visible; display: inline-block;">
<?php
foreach($service as $srv)
{?>
<div style="float:left;width:100px;">
<img src="<?php echo base_url().$srv['service_image'];?>" width="100px"/>
</div>
<div style="float:left;width:300px">
<strong><?php echo $srv['service_title'];?></strong>
<br/>
<strong><?php echo $srv['service_content'];?></strong>
</div>
<div style="clear:both;"></div>
<?php
}?>
</div>
<?php
}
The line
<strong><?php echo $srv['service_content'];?></strong>
contains dynamic text from a database, added through ckeditor.
Now, take a look at this image:
As you can see, the text overflows the div. Setting the div's overflow: hidden
will hide the text next to "contact us."
I want the text to break after "contact us" and continue from "We are just a phone call away."
I know this issue can be fixed with a simple attribute, but I'm unsure of what that is.