UBB.Dev
Posted By: JoshPet Scroll Box in CSS - 07/28/2004 10:09 PM
I've seen JC do this before with the CODE tag.

But I've got some info on a page, which I want to truncate into a scroll box (like an iFrame). I can do an iFrame if needed, so they can scroll through the whole thing - but I thought there's got to be a way to do this in CSS. Any ideas?
Posted By: J.C. Re: Scroll Box in CSS - 07/28/2004 10:45 PM
.tagname {
overflow: auto;
height: 200px;
width: 100%;
padding: 2px;
margin: 1px 1px 1px 1px;
}

Docs on overlfow:
http://www.w3.org/TR/CSS2/visufx.html#propdef-overflow

Then use <span class="tagname"> before and </span> after the text involved.

Posted By: JoshPet Re: Scroll Box in CSS - 07/28/2004 10:47 PM
Thank you!
Posted By: JoshPet Re: Scroll Box in CSS - 07/28/2004 11:11 PM
OK - i can't get it to work.

http://www.biketrip.com/forum/newuser.php

Trying to truncate the rules. You'll see if you view the source that I've done

<span class="boardrules"> above the rules and </span> after the rules.

Then added this to my stylesheet:

.boardrules {
overflow: auto;
height: 200px;
width: 100%;
padding: 2px;
margin: 1px 1px 1px 1px;
}


Any ideas?
Posted By: J.C. Re: Scroll Box in CSS - 07/28/2004 11:45 PM
Try div instead of span
Posted By: JoshPet Re: Scroll Box in CSS - 07/28/2004 11:58 PM


Makes sense. I tried putting the class in a font tag, and in a <td> tag - but <div> did the trick.
Thank you.
© UBB.Developers