Hi, I hope that I have posted in the correct forum category. I have some text that I need to contain in rows as it currently runs straight off the page! The text is linked from another page where it has been added. The first code listed below is the original code and the second is a modified code that was given to me however it does not work correctly. <h2> is what I need to control; I donít know why <h1> was added. My PHP skills are poor! Thanks in advance.
Original Code:
<div class="addetailsmain">
<div class="adsmanager_ads_body">
<div class="adsmanager_ads_desc">

<?php $strtitle = "";if (@$this->positions[2]->title) {$strtitle = JText::_($this->positions[2]->title);} ?>
<?php echo "<h2>".@$strtitle."</h2>";
if (isset($this->fDisplay[3]))
{
foreach($this->fDisplay[3] as $field)
{
$c = $this->field->showFieldValue($this->content,$field);
if ($c != "") {
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
if ($title != "")
echo htmlspecialchars($title).": ";
echo "$c<br/>";
}
}
} ?>
</div>
Modified Code:

CSS Code:
div.text {
width: 300px;
}

PHP/HTML Code:
<div class="addetailsmain">
<div class="adsmanager_ads_body">
<div class="adsmanager_ads_desc">
<?php $strtitle = "";if (@$this->positions[2]->title) {$strtitle = JText::_($this->positions[2]->title);} ?>
<?php echo "<h2>".@$strtitle."</h2>";
if (isset($this->fDisplay[3]))
{
foreach($this->fDisplay[3] as $field)
{
$c = $this->field->showFieldValue($this->content,$field);
if ($c != "") {
$title = $this->field->showFieldTitle(@$this->content->catid,$field);
if ($title != "") {
echo "<h1>" . htmlspecialchars($title). ": </h1>";
echo "<div class=\"text\">" . $c . "</div";
}
}
}
} ?>
</div>