Forum Moderators: open
I have fixed number of nbsps for a particular row or column...but the data is coming from mysql...so the length of data varies...
so for each column in a table, the code for the result looks like this:
'data'
Is there a more reliable way to do this.....
...i should have used cellpadding and cellspacing instead of nbsp
cellpadding/cellspacing and (non-breaking space) are two very different things. It sounds as if you were using characters to control the width of the element?
An alternative to using characters might be to use the CSS
white-spaceproperty to suppress line breaks. eg:
#container {
white-space:nowrap;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>test</title>
</head>
<body>
<table cellpadding="0" cellspacing="0">
<tr>
<td>Lorem ipsum</td>
</tr>
</table>
</body>
</html>
This Page Is Valid XHTML 1.0 Strict!
I had to actually try it, you guys got me so confused.