General discussion

  • Creator
    Topic
  • #2072810

    HTML Table & ASP (updated)

    Locked

    by schenk@nl ·

    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

All Comments

  • Author
    Replies
    • #3782513

      HTML Table & ASP (updated)

      by exchange admin ·

      In reply to HTML Table & ASP (updated)

      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
      • #3783265

        HTML Table & ASP (updated)

        by schenk@nl ·

        In reply to HTML Table & ASP (updated)

        Nope…The size of the date is too variable to give a nice result with this solution…

    • #3783486

      HTML Table & ASP (updated)

      by halleyc ·

      In reply to HTML Table & ASP (updated)

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


      <% Response.write("

      “)
      Response.write(“

      “)
      Response.write(“

        ” & Formatdatetime(Date(),1) & “

      “)

      %>

      • #3783266

        HTML Table & ASP (updated)

        by schenk@nl ·

        In reply to HTML Table & ASP (updated)

        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″…

    • #3783348

      HTML Table & ASP (updated)

      by david jones ·

      In reply to HTML Table & ASP (updated)

      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.

      • #3783267

        HTML Table & ASP (updated)

        by schenk@nl ·

        In reply to HTML Table & ASP (updated)

        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!

Viewing 2 reply threads