Because you have no space characters in the long <TD> tags, the browser doesn't know where to wrap the contents.
Option 1
This is a sample of how a string value from the database can be processed to insert <BR> tags every so many characters and create a new string that can be used in the HTML table cell. I used 20 for the width value. This sample is in VB. You can convert to whatever language you are using. By doing this, you are not modifying the value in the database. You are processing the data for display so that it appears properly.
Dim strFromdatabase As String = "123ggggggggggggggggggggggggggggggggggggggggggghjjjjjjjjjjjjjjjjjjjjjjfjyhfffffffffffffffffffffffffuyyyyyxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Dim strNewString As String
Dim x As Integer
Dim y As Integer
Dim z As Integer
Const CELLWIDTH As Integer = 20
x = strFromdatabase.Length
y = 0
strNewString = ""
While x > 0
z = Math.Min(CELLWIDTH, x)
strNewString += strFromdatabase.Substring(y, z)
x = x - z
y = y + z
If x > 0 Then
strNewString += "<BR>"
End If
End While
Debug.WriteLine(strNewString)
Option 2
Use the
Width
attribute in the <TH> and <TD> tags or define a new style in your stylesheet that contains the
Width
property and use that style for the Email and Password columns.
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>UserName</th>
<th Width=100>Email</th>
<th Width=100>Password</th>
</TR>