Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-13-2011, 02:08 AM   PM User | #1
quartzy
Regular Coder

 
Join Date: May 2009
Posts: 813
Thanks: 123
Thanked 24 Times in 24 Posts
quartzy is an unknown quantity at this point
Scroll bar

I have searched the internet and cannot find code for a simple news box, so the best way is to make my own newsbox with a scroll bar to move downwards on the div.

How would I do this?
quartzy is offline   Reply With Quote
Old 02-13-2011, 02:27 AM   PM User | #2
teedoff
Senior Coder

 
Join Date: Aug 2010
Location: High Point, NC
Posts: 3,325
Thanks: 5
Thanked 363 Times in 360 Posts
teedoff is on a distinguished road
I think dynamicdrive.com has some you might can use. If I'm thinking of the right thing you're wanting.
__________________
Teed
teedoff is offline   Reply With Quote
Old 02-13-2011, 02:32 PM   PM User | #3
quartzy
Regular Coder

 
Join Date: May 2009
Posts: 813
Thanks: 123
Thanked 24 Times in 24 Posts
quartzy is an unknown quantity at this point
No dynamic drive does not have anything I want.
I just want a small div with a scrollbar on it. Do I add overflow: scroll-y?
quartzy is offline   Reply With Quote
Old 02-13-2011, 02:46 PM   PM User | #4
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,613
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
overflow: auto would be the current standards compliant way to do it. overflow-x and -y are Microsoft proprietary properties that are going to be in the upcoming CSS3 recommendation, though. But test browser support before considering to use it.

By the way: http://www.brunildo.org/test/Overflowxy2.html
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Users who have thanked VIPStephan for this post:
quartzy (02-13-2011)
Old 02-13-2011, 03:00 PM   PM User | #5
quartzy
Regular Coder

 
Join Date: May 2009
Posts: 813
Thanks: 123
Thanked 24 Times in 24 Posts
quartzy is an unknown quantity at this point
Thanks for the link stephen, I checked at wc3 schools and am sorted now, with the link you gave.
quartzy is offline   Reply With Quote
Old 02-13-2011, 03:25 PM   PM User | #6
quartzy
Regular Coder

 
Join Date: May 2009
Posts: 813
Thanks: 123
Thanked 24 Times in 24 Posts
quartzy is an unknown quantity at this point
I tried it with browsers FF3 and IE8 but I dont have a scrollbar.

Code:
div#info {
width: 260px;
height: 100px;
overflow:auto;
padding: 0.50em;
margin: 0;
float:right;}

p.ticker {
width: 240px;
border-bottom: 1px dashed #ccc;
padding-bottom: 1em;
margin: 0; padding-top: 5px;}
the html is:
Code:
<div id="info">
<h4 class="booking_box">Latest News!</h4>
<p class="ticker">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit, ante id porttitor faucibus, odio eros pellentesque sapien, at consectetur mi nibh at massa.</p>
<p class="ticker">orem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit, ante id porttitor faucibus, eros pellentesque sapien, at consectetur mi nibh at massa.</p>
</div>
quartzy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:15 PM.


Advertisement
Log in to turn off these ads.