Page 1 of 1

Div overflow problem.

Posted: Fri Oct 22, 2010 11:54 pm
by techkid
Hii.

This is a snapshop from the Design view of Adobe Dreamwaver CS5
Image

Here is the code:

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#test{
	width:500px;
	margin:0 auto;
}
</style>
</head>

<body>
<div id="test">
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
</div>
</body>
</html>
I dont want the text to overflow. I want it to go to the next line without using "<br />" tag.

Re: Div overflow problem.

Posted: Sat Oct 23, 2010 10:10 am
by s.dot
[text]#test{
width:500px;
margin:0 auto;
overflow: auto;
}[/text]

Re: Div overflow problem.

Posted: Sat Oct 23, 2010 10:45 am
by Eran
add 'word-wrap:break-word;' to your div styles.