SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    ::==:: Bonzo_CS's Avatar
    Join Date
    Dec 2003
    Location
    (Cardiff Wales)
    Posts
    747
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Scrolling needed

    Hi All,

    Not sure if this is possible or it maybe a simple question.

    Basically I don't want the page to scroll down as a whole, but using CSS I have a given area where I want to present text using scroll bars like <textarea>. However this text is being called from a db which has been formatted in HTML tags (<h1> etc to present it. Is there a way I can use a given area with such scroll bars to present this HTML tagged data? Otherwise I could save the data unformatted but with white space and call that?

  2. #2
    Non-Member Egor's Avatar
    Join Date
    Jan 2004
    Location
    Melbourne, Australia
    Posts
    7,305
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    You could format the data generated through CSS also:

    Lets say you have:
    Code:
    <div id="scroller">
    <h1>title</h1>
    <p>Paragraph</p>
    </div>
    You could select the inside data from the db like this:

    css:
    Code:
    #scroller {
    width: 200px;
    height: 300px;
    overflow: auto;
    }
    
    #scroller h1 {
    font: 10px Georgia, serif;
    }
    
    #scroller p {
    font-size: 9px;
    color: pink;
    }
    Is this what you were after?

  3. #3
    ::==:: Bonzo_CS's Avatar
    Join Date
    Dec 2003
    Location
    (Cardiff Wales)
    Posts
    747
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile

    Yeah thats spot on Cheers! I'll give that a go asap!


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
  •