Results 1 to 4 of 4

Thread: Iframe scrolling

  1. #1
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default Iframe scrolling

    Ok I cant see what is wrong. The content is scrolling left/right instead of up/down.



    css code
    Code:
    <style type="text/css">
    .iframe {
    overflow:auto;
    height:75px;
    width:100px;
    }
    </style>
    Code:
    <div class="iframe">Message,Message,Message,Message,
    Message,Message,Message,Message,MessageMessage,Message</div>

  2. #2
    Join Date
    Jun 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi,

    In order to have the scroll bar from top to bottom you have to specify the height and width of the div tag as,

    .iframe
    {
    overflow:auto;
    height:30px;
    width:420px;
    }

    Regards,

    Valli.

    (www.syncfusion.com)

    ASP.Net FAQ:
    http://www.syncfusion.com/faq/aspnet/default.aspx

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Vallim
    In order to have the scroll bar from top to bottom you have to specify the height and width of the div tag as,

    .iframe
    {
    overflow:auto;
    height:30px;
    width:420px;
    }
    That is almost exactly what Ben has:

    <style type="text/css">
    .iframe {
    overflow:auto;
    height:75px;
    width:100px;
    }
    </style>
    The real problem is that by not including any white space in the content:

    Code:
    Message,Message,Message,Message,
    Message,Message,Message,Message,MessageMessage,Message
    It cannot wrap and is too wide, needing a horizontal bar. Change the content to:

    Code:
    Message, Message, Message, Message, 
    Message, Message, Message, Message, Message, Message, Message
    and your troubles are over.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    Thanks, I fiqured that out about a minute after I started this thread. I kinda feel stupid.

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
  •