Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Apr 2008
    Location
    Fareham
    Posts
    87
    Tokens
    2,716

    Latest Awards:

    Default Making a div scroll vertically if overflowed...

    Heya guys, well I am coding my sticker web store and I am onto the center where all the information is displayed, so basically what I want is a code for td to scroll vertically if it is overflowed...

    I have tried putting style="overflow: auto;" and it didn't work, I even put a div inside the td and put style="overflow: auto;" then my content inside the div then closing the div again.

    But nothing seems to work, is there any other code I can use that works?
    Forever on the dance floor.

  2. #2
    Join Date
    Dec 2006
    Posts
    3,970
    Tokens
    0

    Latest Awards:

    Default

    dynamic drive has alot of javascripts that do that.
    Lets set the stage on fire, and hollywood will be jealous.

  3. #3
    Join Date
    Apr 2008
    Location
    Fareham
    Posts
    87
    Tokens
    2,716

    Latest Awards:

    Default

    Yeah I know, I am just wondering if there is any easier way to do it.
    Forever on the dance floor.

  4. #4
    Join Date
    Jul 2005
    Location
    Cymru! :o Bahh
    Posts
    571
    Tokens
    0

    Default

    do something like this;
    <style>
    .ScrollDivBox {
    width: 399px;
    height: 212px;
    background-color: transparent;
    overflow: auto;
    border: 0px !important;
    font-family: Verdana;
    font-size: 11px;
    color: ffffff;
    }
    </style>
    That bit of CSS tells the div what size it should be so when the text you want in it goes over the size given it adds the scroll bar, font, font colour, etc, place it in a CSS file or at the top of your page
    Then use this code to display the Div;
    <div class="ScrollDivBox">
    Text text text</div>
    Hope it helped
    Last edited by kreechin; 20-04-2008 at 10:13 PM.

    So A Kiss Is Out Of The Question Then..?

    ♥ My Boy <sinlge> Tbh ♥
    This love isn't good unless it's me and you
    Complicated is the whole point. x

    Theres nothing scarier than getting something you want because then you have something to lose..





  5. #5
    Join Date
    Apr 2008
    Location
    Fareham
    Posts
    87
    Tokens
    2,716

    Latest Awards:

    Default

    Erm, thanks but I already knew allof that.

    And, it still didn't work unfortunaetly, but your help is most appreciated...
    Forever on the dance floor.

  6. #6
    Join Date
    Jul 2005
    Location
    Cymru! :o Bahh
    Posts
    571
    Tokens
    0

    Default

    the code i posted works fine, after the size of the box is expanded, it adds the scrollbar..
    http://free-host.ath.cx/bin/div.htm if you don't believe me, view the page source.

    So A Kiss Is Out Of The Question Then..?

    ♥ My Boy <sinlge> Tbh ♥
    This love isn't good unless it's me and you
    Complicated is the whole point. x

    Theres nothing scarier than getting something you want because then you have something to lose..





  7. #7
    Join Date
    Apr 2008
    Location
    Fareham
    Posts
    87
    Tokens
    2,716

    Latest Awards:

    Default

    Quote Originally Posted by kreechin View Post
    the code i posted works fine, after the size of the box is expanded, it adds the scrollbar..
    http://free-host.ath.cx/bin/div.htm if you don't believe me, view the page source.
    I do believe you, but mine is in a td and it doesn't scroll for some really strange reason it just keeps going down and doesn't stop and I have a set height...
    Forever on the dance floor.

  8. #8
    Join Date
    Jul 2005
    Location
    Cymru! :o Bahh
    Posts
    571
    Tokens
    0

    Default

    Ahh I'm sorry about that, I didn't read your post propper, to make a TD scrollable use this code;
    <style type="text/css">
    #scroll {
    height:50px;
    width:50px;
    overflow:auto;
    }
    </style>
    and to display the scrollable TD use this;
    <td>
    <div id="scroll">This div will get the scroll bar when the text is bigger then the div</div>
    </td>
    Just needed to put a div inside the td tags.

    So A Kiss Is Out Of The Question Then..?

    ♥ My Boy <sinlge> Tbh ♥
    This love isn't good unless it's me and you
    Complicated is the whole point. x

    Theres nothing scarier than getting something you want because then you have something to lose..





  9. #9
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    It's overflow: scroll;

    Is it not? :S


  10. #10
    Join Date
    Apr 2008
    Location
    Fareham
    Posts
    87
    Tokens
    2,716

    Latest Awards:

    Default

    It is L?KE but it gives it a horizontal scroll as well unfortunaetly and it just looks icky.
    Forever on the dance floor.

Page 1 of 2 12 LastLast

Posting Permissions

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