php/html/css/mysql. What's the problem?

Findd Online

New member
CSS
#Ad
{
float: right;
text-align: left;
height: 400px;
width: 160px;
padding: 10px;
}

HTML/PHP/MYSQL
<div id="Ad">
</body>
</html>
<?php
$result = mysql_query(" SELECT * FROM products WHERE tag1='$Search' OR tag2='$Search' OR tag3='$Search' AND adfinish!='' ORDER BY rank DESC");
while($row1 = mysql_fetch_assoc($result))
{
if($row1['adfinish'] != "0000-00-00")
{
$url = $row1['url'];
$final_url = $row1['finalurl'];
$title = $row1['title'];
$shortdescription = $row1['shortdescription'];
echo "<a href=\"" . $url . ".php" . "\"><h3>" . $title . "</h3></a>";
echo " - " . $shortdescription . "</br>";
echo "<i> " . $final_url . " </i>";
}
}

?>
<html>
<body>
</div>

Everything works fine except that the text that gets inserted into the ad div sometimes gos way past the border. For example:

text...text...text||<--Border
text...text...text||
text...text...text||more...text...more...text
text...text...text||
 
Back
Top