我有一个问题,在我的博客proj,我有一个textarea,用户可以键入和IM传递给我的MySQL表,问题是文本溢出在我的
我尝试了wordwrap()但仍然其他文本溢出我不dont如何“格式化”,以便自动将其格式化以适合我的div或我的做法是错误的oO?,imma newbie on php显然:P ..谢谢...
session_start();
function __autoload($className)
{
require $className . '.php';
}
$emptyMsg ='';
$conn=new connection();
$conn->conn('localhost','****','');
if(!isset($_SESSION['username']))
{
die('Log In 1st!Log In');
}
$query = "SELECT blog_content FROM tbl_blog";
$queryResult=mysql_query($query) or die();
?>
p
{
}
#nav
{
}
ul li
{
list-style:none;
}
#blog_wrap
{
clear:both;
width:800px;
height:600px;
margin:0 auto;
background-color:blue;
}
.content
{
width:700px;
clear:both;
float:left;
height:auto;
background-color:gray;
color:lightgreen;
text-align:left;
margin:10px 0 0 50px;
}
.content ul li
{
color:red;
background-color:green;
overflow:visible;
}
.content2
{
width:700px;
clear:both;
float:left;
height:auto;
background-color:yellow;
color:lightgreen;
margin:10px 0 0 50px;
}
$count=0;
while($rows=mysql_fetch_array($queryResult))
{
if($count % 2 ==0)
{
echo '
echo '
- ';
echo '
' . $rows['blog_content'] . '';echo '
';echo '
}
else
{
echo '
echo '
- ';
echo '
' . $rows['blog_content'] . '';echo '
';echo '
}
$count++;
}
?>