Home

Forums

Web development

 

 

 

 
     
 
dna88 Web development and Technology Forum
 
Profile   Register   Memberlist   Usergroups   FAQ   Search  Log in
How to make div tag to scroll

 
Post new topic   Reply to topic    dna88 Forum Index -> Web scripting language Discussion Forum
Author Message
dude
Power User
Power User


Joined: 10 Mar 2004
Posts: 376
Location: Savar, Dhaka

Post Post subject: How to make div tag to scroll Reply with quote

Hi everyone,

Here is my simple question. How can I make the contents inside a <div> tag to scroll? I have seen it in some websites and it looks very good.
Mon Aug 23, 04 1:44 pm
Back to top
dude View user's profile Send private message Visit poster's website
quantum
Site Admin
Site Admin


Joined: 07 Mar 2004
Posts: 1048
Location: Dhaka, Bangladesh

Post Post subject: Making text and contents in div scroll vertically Reply with quote

Adding a scrollbar to your <div> tag is very simple and yes, useful too. All you have to do is, set the style property overflow to auto. And your contents inside the dic tag will scroll vertically. Note that not horizontally though. Which is good for you. Below is style properties for a cool scrolling div that I made once.

Code:
<div style="height: 100px; width: 100%; font-size: 10pt; line-height: 120%; padding: 1px; scrollbar-face-color: rgb(255, 255, 255);
scrollbar-arrow-color: rgb(255, 153, 0);
scrollbar-highlight-color: rgb(204, 204, 204);
scrollbar-3dlight-color: rgb(255, 255, 255);
scrollbar-shadow-color: rgb(204, 204, 204);
scrollbar-darkshadow-color: rgb(255, 255, 255);
scrollbar-track-color: rgb(255, 255, 255)
background-color: rgb(255,255,255);
overflow: auto;">


Hope you like it!
_________________

Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
Mon Aug 23, 04 2:38 pm
Back to top
quantum View user's profile Send private message Visit poster's website AIM Address
dude
Power User
Power User


Joined: 10 Mar 2004
Posts: 376
Location: Savar, Dhaka

Post Post subject: Scroll images within div tag? Reply with quote

That looks dandy. I tried it on a white background and contrasts good. Can I use images inside the div tag and have it scroll vertically like text?
Tue Aug 24, 04 2:04 pm
Back to top
dude View user's profile Send private message Visit poster's website
emm
Power User
Power User


Joined: 13 Jul 2004
Posts: 310

Post Post subject: Put images in scrolling div tag Reply with quote

Yes Dude, you can put any content inside the div tag and that includes images. As far as I know.
_________________
“You might say reality is the result of complex negotiations between the observer and the observed. But that is simply a point of view…”
Digital Bangladesh
Wed Aug 25, 04 12:13 am
Back to top
emm View user's profile Send private message
dude
Power User
Power User


Joined: 10 Mar 2004
Posts: 376
Location: Savar, Dhaka

Post Post subject: Image inside Div tags! Reply with quote

That's awesome.
Fri Aug 27, 04 8:47 am
Back to top
dude View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    dna88 Forum Index -> Web scripting language Discussion Forum All times are GMT - 7 Hours
Page 1 of 1

 

Partners and Resources

Bangladesh hosting company

Bangladesh web design

Driven by phpBB © phpBB Group