Discussion Locked

HTML Table & ASP (updated)

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

HTML & ASP
I have quite some nested tables, but for this problem an example with just one table should work too.

I have a fixed-width table with 2 cells. The second cell contains the date in a format like "Wednesdag, June 28, 2000" so with theday and month written out. The first cell should widen to fill the space not used by the date-cell. This first cell is used to place a line in front of the date (using a background-image). Unfortunately, this doesn't work. The first cell becomes just one pixel width (the size of the transparant picture inside it). What I would like to know is:

1) Is there a way in HTML to tell MSIE (and NS etc) to widen the first cell instead of the second one; if so: how?

or

2) Could this be done using a calculation of the width of the date-string in ASP and again, if so: how?

The first solution has my preference...

TIA,
Fred

Proposed Answer 1: Rejected
From: gokul Date: Jun 28 2000 6:44AM

Friend,
The problem encountered could be becaue t

6 replies

by exchange admin

This example sets the table to be 100% of the width of the screen but you can change that to a pixel or other percentage if needed. Under the Column settings you will need to specify the Width of the columns. It can also be Percentages or Pixels your choice. Hope this helps you.

- Wednesday , June 28 2000

by halleyc

Try to specify the second cell width only. See the following code.

<%

Response.write("

")
Response.write("

")
Response.write("

  " & Formatdatetime(Date(),1) & "

")

%>

by Member 22219174

Nope. Here again my problem is the fact that I don't know the size of the second cel beforehand..."Friday, 1 may 2000" is a lot smaler than "Wednesday, 28 septembre 2000"...

by david jones

You could try to use a very high percentage in the first column and in the second column you would round out the percentage, and use the no wrap. This is what I am thinking of...

. Wednesday June 28, 2000

This way, the NoWrap will automatically size the last column to the length it needs.

by Member 22219174

This does indeed work...It just introduced another problem with the alignment, but still I would like to give you some credits. Incidently, I came up with a solution of my own:

ASP: FormatDate

(just show the important parts of the code)...

Thank you all for your input!

This discussion is closed to new replies.