Table going past width boundries

Discussion in 'HTML' started by Geoff Robinson, Oct 20, 2004.

  1. Hi,

    I am creating a table dynamically, and I need it to fall within a
    certain width. My problem is that some data is too long and is causing
    the table to go past the specified width. Is there a way to force a
    cell or a row to not go beyond the width even if the data is too
    large?

    thanks for any help in advance,
    Geoff
     
    Geoff Robinson, Oct 20, 2004
    #1
    1. Advertising

  2. Geoff Robinson

    brucie Guest

    In alt.html Geoff Robinson said:

    > Hi,


    g'day

    > I am creating a table dynamically, and I need it to fall within a
    > certain width.


    tables and their cells expand to hold their content.

    > My problem is that some data is too long and is causing
    > the table to go past the specified width.


    don't put so much in. its being dynamically generated so its would be
    simple to do. but then you have things like font size issues.

    > Is there a way to force


    no.

    > a cell or a row to not go beyond the width even if the data is too
    > large?


    truncate the data while allowing a reasonable amount of flexibility to
    account for different font sizes/families etc.

    or use a bit of css to hide or scroll the content but that sucks.

    or instead of trying to force your table to fit within the design
    redesign so its not an issue.



    --


    v o i c e s
     
    brucie, Oct 20, 2004
    #2
    1. Advertising

  3. Geoff Robinson

    aa Guest

    In a W3C complient browser tables comply to the WIDTH attribute.
    (IE in the absence of WIDTH attribute makes a table to fit into the screen
    width automatically)
    The length of data is irrelevant as too long data is broken into lines and
    expanded downwards.
    However there is a natural exeption:
    if data is a string with no spaces or an object like an image which cannot
    be broken into several lines, then the cell width is expanded to accomodate
    this data
    This usually becomes an issue if you have too many columns so that each
    column becomes too narrow even for a single word.
    So you have to monitor number of columns and the longest word/object in each
    column.
     
    aa, Oct 22, 2004
    #3
  4. Geoff Robinson

    rf Guest

    aa wrote

    > In a W3C complient browser tables comply to the WIDTH attribute.
    > (IE in the absence of WIDTH attribute makes a table to fit into the screen
    > width automatically)


    IE and just about every other visual browser, in the absence of a width
    attribute, make the table fit the size of the content, not the browser
    window width and most certainly not the width of the viewers screen.

    --
    Cheers
    Richard.
     
    rf, Oct 23, 2004
    #4
  5. Geoff Robinson

    aa Guest

    Take IE6, experiment and report the result

    "rf" <rf@.invalid> wrote in message
    news:kajed.35914$...
    > aa wrote
    >
    > > In a W3C complient browser tables comply to the WIDTH attribute.
    > > (IE in the absence of WIDTH attribute makes a table to fit into the

    screen
    > > width automatically)

    >
    > IE and just about every other visual browser, in the absence of a width
    > attribute, make the table fit the size of the content, not the browser
    > window width and most certainly not the width of the viewers screen.
    >
    > --
    > Cheers
    > Richard.
    >
    >
     
    aa, Oct 26, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AndrewF
    Replies:
    1
    Views:
    811
    Bruce Barker
    Oct 10, 2005
  2. Sean Jorden
    Replies:
    1
    Views:
    609
    laurie
    Aug 19, 2003
  3. kris
    Replies:
    11
    Views:
    893
  4. Replies:
    19
    Views:
    529
    Paul Rubin
    Oct 28, 2007
  5. Fredrik Johansson

    Going past the float size limits?

    Fredrik Johansson, Oct 28, 2007, in forum: Python
    Replies:
    0
    Views:
    269
    Fredrik Johansson
    Oct 28, 2007
Loading...

Share This Page