problem aligning text in table cell

W

Willem

Hi,

I'm creating an asp page with presents text from a database in a table.
Because the various database fields don't always contain text, I use  
in each table cell to make sure the cell has borders in case it stays empty.
This works fine, but when a cell does contain text and this text is more
than one line, the text doesn't align correct in the cell. The first line
begins after one space (due to the   of course) and the second and
following lines begin exactly aligned left.
Seems I have to choose between empty cells with no border and oddly left
aligned text, or is there a solution to this problem?

TIA,

Wim
 
E

Els

Willem said:
Hi,

I'm creating an asp page with presents text from a database in a table.
Because the various database fields don't always contain text, I use  
in each table cell to make sure the cell has borders in case it stays empty.
This works fine, but when a cell does contain text and this text is more
than one line, the text doesn't align correct in the cell. The first line
begins after one space (due to the   of course) and the second and
following lines begin exactly aligned left.
Seems I have to choose between empty cells with no border and oddly left
aligned text, or is there a solution to this problem?

I don't know any ASP myself, but I just know it must be possible to
write a line like "if table cell is empty, fill with  " (but then
in nice programming code stuff)
 
M

Mark Parnell

Previously in alt.html said:
I'm creating an asp page with presents text from a database in a table.
Because the various database fields don't always contain text, I use  
in each table cell to make sure the cell has borders in case it stays empty.
Seems I have to choose between empty cells with no border and oddly left
aligned text, or is there a solution to this problem?

Why not only insert a   if the database field is empty?
 
A

Adrienne

Hi,

I'm creating an asp page with presents text from a database in a table.
Because the various database fields don't always contain text, I use
  in each table cell to make sure the cell has borders in case it
stays empty. This works fine, but when a cell does contain text and
this text is more than one line, the text doesn't align correct in the
cell. The first line begins after one space (due to the   of
course) and the second and following lines begin exactly aligned left.
Seems I have to choose between empty cells with no border and oddly
left aligned text, or is there a solution to this problem?

TIA,

Wim

If IsNull(rs("field")) Then
field = " "
else
field = trim(rs("field"))
end if
%>
<td><%=field%></td>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top