Results 1 to 9 of 9

Thread: overflow

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2001
    Posts
    24

    overflow

    Does overflow work for tables and table cells because I'm having a hell of a time trying to implement overflow?

  2. #2
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

  3. #3
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    I seem to remember that I got it to work for cells in Mozilla at least, but I could be wrong.

  4. #4
    Fanatic Member JCScoobyRS's Avatar
    Join Date
    Oct 2002
    Location
    Some Mountain in Colorado
    Posts
    677
    I went to that thread last night and I copied the code and created a scroll bar in a table. I just don't understand what it's doing so I can use it later. Here is the code:

    Code:
    <div>
       <span style="overflow-y:auto;height:450;">
         <table border="0" align="center" >		  	  
           :
           :
          </table>
       </span>
    </div>
    Can someone explain to me what this is doing and where to get information on it? Thanks, Jeremy
    He who listens well, speaks well.

  5. #5
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196
    a kind of dinfintion:
    DIV
    Allows you to insert a division, which is used to partition a document into segments. Divisions are used to enclose other HTML elements to which you want to apply style information or which you want to position absolutely on the page.

    You'll have noticed from the thread to drop the SPAN tags and place the style in the DIV

    so your setting the height of the DIV to 450
    in the event that the content between the div tags renders greater than that height ie it overflows on the y then automatically add a scrollbar

  6. #6
    Fanatic Member JCScoobyRS's Avatar
    Join Date
    Oct 2002
    Location
    Some Mountain in Colorado
    Posts
    677
    When I took out the span tags, it didn't work. It's working perfect for me the way it is. Do you know why this is happening? I don't want to run into problems later. Thanks, Jeremy
    He who listens well, speaks well.

  7. #7
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196
    Is this what you have now?
    Code:
    <div style="overflow-y:auto;height:450px;">
         <table border="0" align="center" >		  	  
           :
           :
          </table>
    </div>
    note the style that was in the SPAN is now in the DIV
    I've also just added px to the 450 RickBull pointed out earlier that you should really specify the type

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Oct 2001
    Posts
    24
    What I mean is there any way to add overflow for just cells,
    td.overflow { overflow: auto; height: 60% }

    <td class="overflow">data goes here

    will that work? I got the overflow to work for the whole table but I just need it for one cell.

  9. #9
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    I've just checked the CSS specs and (sorry if this was in the other thread, I couldn't be bothered to check ) overflow only applies to block-level and replaced elements , so it won't (or shouldn't) work on cells. You should be able to do it on table rows I think. I'm not sure if they're classed as block-level elements in CSS though. They are in HTML but I'm not totally sure about CSS, which would explain why overflow doesn't work with tables.

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