3 Replies Latest reply on Apr 16, 2012 10:02 AM by sudarshan.t

    adding scrollbar

    jinda55 Level 1

      How do you add a scrollbar in CS5.5?

       

      Edit: By this I mean a textbox with a scrollbar

        • 1. Re: adding scrollbar
          sudarshan.t Level 6

          CSS can help you with that.

           

          Create a new css tag either in your external CSS sheet or inline to your HTML body.

           

          #divName {

          width: 500px;

          height: 400px; /**adjust height as needed**/

          overflow: scroll;

          }

          This is the basic CSS script. You could style it any way you'd like.

           

          You can then use the following script in your HTML:

           

          <div class="divName">

          Lorem ipsum dolor Lorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolor.

          Lorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolor.

          Lorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolor.

          Lorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolor.

          Lorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolor.

          Lorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolor.

          Lorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolor.

          Lorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolorLorem ipsum dolor.

          </div>

          This will make this DIV 400px tall. Any content that is displayed over 400px will start scrolling automatically. Please note if your content already fits into 400px, you wont see a scrollbar.

           

           

          You can read more on the overflow property here: http://www.w3schools.com/Css/pr_pos_overflow.asp

           

          Trust this helps.

          1 person found this helpful
          • 2. Re: adding scrollbar
            jinda55 Level 1

            Thanks

             

            It helped a lot!

            • 3. Re: adding scrollbar
              sudarshan.t Level 6

              You're welcome.

               

              If you need more assistance, paste the code you're working on here and I'll see how I can be of help.