Overflow in Firefox?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BaseballGraphs
    New Member
    • Sep 2010
    • 75

    #1

    Overflow in Firefox?

    Hello,

    I would like a scroll bar to appear if the contents of a table exceeds the set height of that table and I understand that this can be done with overflow. I have set it and it works in Chrome but it does not appear to be working in FireFox. In FireFox it appears to be extending the cell's height. Obviously, I would like to maintain the cells height in my table and have a scroll bar appear if the contents exceed the height.

    Here is the code I am using:
    Code:
    <table width="100%" height="75%" border="0">
    <tr>
    <td width="25%"><div style="padding : 4px; width : 100%; height : 100%; overflow : auto; ">
    If you know how I can get this to render correctly in Firefox I would be very appreciative! Thanks.
  • Death Slaught
    Top Contributor
    • Aug 2007
    • 1137

    #2
    Just change the overflow property to scroll.

    Code:
    overflow: scroll;
    Thanks, Death

    Comment

    • BaseballGraphs
      New Member
      • Sep 2010
      • 75

      #3
      I tried changing it to overflow:scroll ; but it does not appear to have any effect in firefox, the contents of the cell are still extending beyond the height of the cell that I set...any other suggestions?

      Comment

      • Death Slaught
        Top Contributor
        • Aug 2007
        • 1137

        #4
        That's because you're using percentages. The content is going to be 100% of the table it's contained in (which is 75% of whatever the table is contained in). Try setting the values to pixels.

        - Death

        Comment

        • BaseballGraphs
          New Member
          • Sep 2010
          • 75

          #5
          That seems to work!

          Thanks.

          Comment

          • Death Slaught
            Top Contributor
            • Aug 2007
            • 1137

            #6
            No problem~

            Regards, Death

            Comment

            Working...