SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2002
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    overflow:auto in IE and Mozilla/Opera

    A project I am working on uses a basic syntax highlighter to display a selected file. It uses a div with the overflow set to auto. The div works perfectly in Opera and Mozilla by forcing a horiz scrollbar if the line length exceeds the page/table width. In IE6, it forces a browser horiz scrollbar but not one in the div. Any workarounds to this?

    Code:
       
    <table width="98%" align="center">
    <tr>
    <td>
    <div style="overflow: auto; border: 1px solid #bbb;"> code </div>
    </td>
    </tr>
    </table>
    Example: http://mtjo.f2o.org/dev/file_div.html

  2. #2
    SitePoint Member
    Join Date
    Oct 2003
    Location
    desert
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    set the following attribute

    max-width: 100px;

    for that div. of course, change 100 to whatever you want.


Bookmarks

Posting Permissions

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