CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2011
    Posts
    5

    Using Fixed and Dynamic columns in a table?

    Hello everyone,

    II would like to have a HTML table with 6 columns. The Table width is 1500. The last 2 columns I want fixed at 150px. The remaining columns I want no formatting. I don't want any of the rows to wrap text if the content gets too large.

    How do i code this correctly in HTML?

  2. #2
    Join Date
    May 2002
    Posts
    10,943

    Re: Using Fixed and Dynamic columns in a table?

    Set the last 2 <td> cells to be 150px and make sure the white-space with your preferred property.
    If the post was helpful...Rate it! Remember to use [code] or [php] tags.

  3. #3
    Join Date
    Apr 2000
    Location
    Belgium (Europe)
    Posts
    4,626

    Re: Using Fixed and Dynamic columns in a table?

    I doubt you can do what you want, tables are notoriously known for not respecting things like overflow.
    The whole point about tables is that they auto adjust to accommodate various content, and trying to defeat that typically won't work.

    what would work, but it may not suit your need, is stick a div inside the td. That div needs to have a fixed width (not a %), overflow:hidden and white-space:nowrap.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured