38 users online (0 members and 38 guests)  


  Results 1 to 2 of 2

Related

  1. hidden text in source !    Forum: Search Engine Optimization - SEO - Forum
    Replies: 12
  2. Replies: 4
  3. Hidden links on an image    Forum: Javascript Forum
    Replies: 2
  4. td { overflow: hidden; } ?    Forum: CSS Forum
    Replies: 10
  5. Replies: 10
  1. #1
    bz1917's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2008
    Posts
    2

    Overflow hidden in a table

    It looks like I am missing something. With overflow:hidden I expect col1 and col2 to be the same width and field WWWW to be trimmed to fit.

    Code:
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    
    <head>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    </head>
    
    <body>
    
    <table cellspacing="0" cellpadding="0" border="1">
    <tr>
       <td width:100px><div>123456789</div></td>
       <td width:100px><div>123456789</div></td>
    </tr>
    <tr>
       <td width:100px><div style="overflow:hidden">WWWWWWWWWWWWWWW</div></td>
       <td width:100px><div>123456789</div></td>
    </tr>
    
    </table>
    
    </body>
    </html>

    Please, help
    Last edited by vinyl-junkie; 12-07-2008 at 11:54 AM. Reason: Added code tags

  2. #2
    bz1917's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2008
    Posts
    2

    Re: Overflow hidden in a table

    It was my mistake. The code should look like:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    
    <head>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    </head>
    
    <body>
    
    <table cellspacing="0" cellpadding="0" border="1">
    <tr>
       <td><div style="overflow:hidden;width:100px">123456789</div></td>
       <td><div style="overflow:hidden;width:100px">123456789</div></td>
    </tr>
    <tr>
       <td><div style="overflow:hidden;width:100px">WWWWWWWWWWWWWWW</div></td>
       <td><div style="overflow:hidden;width:100px">123456789</div></td>
    </tr>
    
    </table>
    
    </body>
    </html>
    Last edited by vinyl-junkie; 12-07-2008 at 11:55 AM. Reason: Added code tags



Tags for this Thread