Search Options
close
Search the following clips:
All Clips
Everyone's Clips
My Guides
Sign Up
Install
Learn More
Login
Control div scrolling with javascript
ghiberti
follow
0
1-12-2007 7:05 PM
5815 views
tags:
javascript
,
dom
,
css
,
design
,
web
,
html
,
ui
Add a Comment
Login
to Comment. Not a member yet?
Sign up
Today's Top Clips
50 Beautiful Watercolor Paintings
How the Mysterious Giant Spiral Happened. Sorry people, no alien invasions. Yet.
Ireland"s strict abortion laws challenged
Brilliant Beck: Catches Acorn LYING AGAIN
100 Billion Galaxies
Diane Francis, Canadian lunatic, calls for a "GLOBAL ONE CHILD POLICY, LIKE CHINA'S"
The New Yard Signs Are Here! The New Yard Signs Are Here!
Sharpton Blasts Tiger Woods
ClimateGate: the raw data
International Repsect Restored
visit the
Top Clips page
View the Top Clips from
January 12, 2007
Embed This Clip In Your Site...
<div style="margin: 12px 0px; font-family: arial; color: #333333; background: #ffffff; border: solid 4px #e5e5e5; width: 100%; clear: left;"><div class="CM_CTB_Content_Wrap" style="margin: 0px; padding: 0px;background-color: #ffffff;"><div style="border-bottom: solid 1px #dcdcdc; white-space: nowrap; margin-bottom: 8px; background-color: #eeeeee ;background-image: url(http://www.clipmarks.com/images/source-bg.gif); background-repeat: repeat-x; height: 24px; line-height: 24px; vertical-align: middle; padding-bottom: 4px; color: #666666; font-size: 10px;" ><a href="http://clipmarks.com/clip-to-blog/" title="see clips that are hot right now"><img src="http://content.clipmarks.com/blog_embed/7651ae98-69fe-41e3-9dfd-34ff8ab422a3/B4576C38-B17B-4D6A-881A-AFF923B2A3DA/" alt="" width="19" height="19" border="0" style="vertical-align: middle; margin: 0px 4px; display: inline; border: none; float:none;" /></a>clipped from <a title="http://www.cyclomedia.co.uk/projects/scroller/scroller_demo.htm" href="http://www.cyclomedia.co.uk/projects/scroller/scroller_demo.htm" style="font-size: 11px;">www.cyclomedia.co.uk</a></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.cyclomedia.co.uk/projects/scroller/scroller_demo.htm"><DIV id="worldWrapper"> <DIV id="worldOuter" class="scroller"><DIV id="world" class="scrollinner"> <IMG alt="Big%20map%20of%20the%20World" src="http://www.cyclomedia.co.uk/projects/scroller/world.jpg" /> </DIV></DIV> <DIV id="mapControls"> <DIV class="scrolllt"><IMG alt="scroll%20up" src="http://www.cyclomedia.co.uk/projects/scroller/scroll-lt-40.gif" /></DIV> <DIV> <DIV class="scrollup"><IMG alt="scroll%20up" src="http://www.cyclomedia.co.uk/projects/scroller/scroll-up-40.gif" /></DIV> <DIV class="scrolldn"><IMG alt="scroll%20down" src="http://www.cyclomedia.co.uk/projects/scroller/scroll-dn-40.gif" /></DIV> </DIV> <DIV class="scrollrt"><IMG alt="scroll%20down" src="http://www.cyclomedia.co.uk/projects/scroller/scroll-rt-40.gif" /></DIV> </DIV> <DIV class="clearer"></DIV> </DIV></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.cyclomedia.co.uk/projects/scroller/scroller_demo.htm"><H2>Using Javascript to scroll the contents of a div with overflow hidden</H2></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.cyclomedia.co.uk/projects/scroller/scroller_demo.htm"><P> This loads two files, the CSS stylesheet <A href="http://www.cyclomedia.co.uk/projects/scroller/cyclomedia_scroller.css">cyclomedia_scroller.css</A> and the Javascript source file <A href="http://www.cyclomedia.co.uk/projects/scroller/cyclomedia_scroller.js">cyclomedia_scroller.js</A>. If the user does not have scripting enabled they will see standard CSS overflow scroll bars to move them around the divs. If scripting is enabled then a secondary CSS file <A href="http://www.cyclomedia.co.uk/projects/scroller/cyclomedia_scroller_imported.css">cyclomedia_scroller_imported.css</A> will be loaded to overload the default stylesheet, hide the scrollbars and show javascript enabled custom scroll controls. </P></blockquote><div style="height: 2px; font-size: 2px; background: #dcdcdc; border-bottom: solid 1px #f5f5f5; margin: 2px 4px;"></div><blockquote style="text-align: left; padding: 0px 8px; margin: 4px 0px 8px 0px; background: transparent; border: none;" cite="http://www.cyclomedia.co.uk/projects/scroller/scroller_demo.htm"><P> This technique of maintaining compatibility through degredation is explained <A href="http://www.cyclomedia.co.uk/?40">here</A> and there is a very simple demo of the technique <A href="http://www.cyclomedia.co.uk/demos/javascript_css_override.htm">here</A>. </P></blockquote></div><div style="margin: 0px 6px 6px 4px;"><table style="font-size: 11px;border-spacing: 0px;padding: 0px;" cellpadding="0" cellspacing="0" width="100%"><tr><td style="background:transparent;border-width:0px;padding:0px;"> </td><td align="right" style="background:transparent;border-width:0px;padding:0px;width:107px" width="107"><a href="http://clipmarks.com/share/B4576C38-B17B-4D6A-881A-AFF923B2A3DA/blog/" title="blog or email this clip"><img src="http://content9.clipmarks.com/images/c2b-foot.png" border="0" alt="blog it" width="107" height="17" style="border-width:0px;padding:0px;margin:0px;" /></a></td></tr></table></div></div>
New from the makers of Clipmarks:
Amplify.com - Don't just share the news...Amplify it!
Clipmarks
Home
New Clips
Top Clips
Dashboard
Popular Topics
News
Life
Science
Technology
Entertainment
Get Started
Sign Up
Install Clipping Tool
How Clipping Works
Clip-to-Blog™
ClipSearch
Tools and Resources
FAQ
ClipWeek
Top Clippers
Top Tags
Site Map
About Clipmarks
About Us
Contact
Copyright
Privacy
EULA
OK