I have been asked to write some code which holds, or scrolls a bit of content at a fixed location on the screen. I have seen this done but I have not located the starter code to place this in my project. I hope someone can point me in the right directions.
Thanks!
WBR
rouse
0
Junior Poster
Recommended Answers
Jump to Postput your content in a div block then write a function like this :
function x()
{
document.getElementById('your div id').style.top = number;
document.getElementById('your div id').style.left= number;
}
Jump to PostThe overflow attribute causes scroll bars if the content overflows the width of the div.
<div id="fixedContent" style="position: absolute; top: 50px; left: 50px; width: 280px; height: 150px; overflow: auto;"> <p> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore …
All 6 Replies
serkan sendur
821
Postaholic
Banned
hollystyles
113
Veteran Poster
DangerDev
107
Posting Pro in Training
rouse
0
Junior Poster
FC Jamison
31
Posting Pro in Training
Team Colleague
FC Jamison
31
Posting Pro in Training
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.