dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: div tag used to create a scrolling box

  1. #1
    Join Date
    Jul 2003
    Location
    UK
    Posts
    392

    div tag used to create a scrolling box

    hi,
    instead of using a frameset to product a scrolling box inside a page, I want to use a div tag, which I heard is easier, can anyone quickly tell me how this is done, or post some code that produces what I want,
    thanks a lot

  2. #2
    Join Date
    Mar 2004
    Location
    Netherlands
    Posts
    257
    what exactly do you want to do? A DIV tag is a container for HTML tags... you can insert text but also images, inputs and other stuff. With the overflow (see http://msdn.microsoft.com/librabry) attribute you can say that there must be scrollbars.

    JayDie

  3. #3
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Damon,

    Using CSS, add
    width: npx; height: npx; overflow: auto; to your DIV. Where n is equivalent to any integer, and does not have to be the same in both instances. When the DIV exceeds the specified width and/or height, scrollbars will appear, rather than expanding.

    You cannot use a DIV in the place of an IFrame or frame, because it is not its own document, it is just a display technique.

    Hope this helps,

    [J]ona

  4. #4
    Join Date
    Sep 2003
    Posts
    58
    You helped me.

    I was going to redo the pics on my site because they kept scrolling when I didn't want them to. I wanted just the text to scroll. But now I see how to use div to add the scrollbar. Thanks.

  5. #5
    Join Date
    Jan 2003
    Location
    Texas
    Posts
    10,413
    Glad you got it working.

    [J]ona

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles