Results 1 to 6 of 6

Thread: div overflow-x scrollbar covers part of div

  1. #1

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057

    div overflow-x scrollbar covers part of div

    I have a table that I build dynamicly with ASP. I have unlimited height allowance but only 601 px width allowance. I have put the table into a div with a width of 601px and set the overflow-x style to auto. Theoreticly that will give me a scrollbar on the bottom but not make the table get any wider but if the form needs to be higher then it just is, no changes. That part works. my problem is that the scrollbar it adds covers 1/2 of the last row in the table rather than after it, which of course is no good at all.
    Anyone run into this before?
    Thanks in advance,
    Michael

  2. #2
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    No, not at all. But... before someone says anything about transparent gifs...

    Can you use JavaScript to deduce the height of the table and dynamicly set the DIV to be just slightly taller?

    Or, if you are not using table borders, then add a row to the end with   values. Hopefully the scroll bar will cover your null row.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  3. #3

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    I have to start the div before I build the table so that Idea wont work (was my first thought though).
    The table is less than 601px wide most of the time and the first programmer wrote it using the border=1 way of drawing the table lines so it looks bad.

  4. #4
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    You can still try the JavaScript thing. Even though the entire page is laid out, you want to set the DIV size onLoad. So as the UA is loading the page, it will figure the table height, and then set the DIV's height.

    The user will never see it, but the DIV actually changed size when his browser started to display it.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  5. #5

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    im having a hard time getting the height of the table.
    document.all.calendarTable.height is what i am trying

  6. #6
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    This is all I have, and I can't get anything either.

    Code:
    <html>
      <head></head>
      <body>
        <table id="myTable">
          <tr>
            <td>Foo</td>
            <td>Bar</td>
          </tr>
        </table>
        <p>
          <script type="text/javascript">
            var myTable = document.getElementById("myTable");
            document.writeln(myTable.getPropertyValue("height"));
          </script>
        </p>
      </body>
    </html>
    But I can't find any really really good documentation for JavaScript, so I may be using something wrong.

    The W3C did have a note saying that the current version of CSS does not specify how to resolve table height if it is different than the sum of the table's rows' heights.
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

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