September 8, 200620 yr how do you do the floating image so as you scroll up or down a page the image follows you?
September 8, 200620 yr how do you do the floating image so as you scroll up or down a page the image follows you? Hi Rob, Good Question, a really simple and easy to use floating navigation box is here: Floating Navigation Code Also, if you look around the whole of that site, you'll find some other really cool scripts also. Cheers. Ben
September 8, 200620 yr Author Hi Rob, Good Question, a really simple and easy to use floating navigation box is here: Floating Navigation Code Also, if you look around the whole of that site, you'll find some other really cool scripts also. Cheers. Ben Excellent resource, but they didnt tell you were the actual link to the image was, and i know nothing of java so couldnt suss it out. found this though which is self explanitory: <!-- THREE STEPS TO INSTALL LOGO BRANDING: 1. Insert the first code into the HEAD of your HTML document 2. Add the onLoad event handler to the BODY tag 3. the last code into the BODY of your HTML document --> <!-- STEP ONE: Put this code into the HEAD of your HTML document --> <head> <script type="text/javascript" language="JavaScript"> <!-- Begin function setVariables() { imgwidth=235; // logo width, in pixels imgheight=19; // logo height, in pixels if (navigator.appName == "Netscape") { horz=".left"; vert=".top"; docStyle="document."; styleDoc=""; innerW="window.innerWidth"; innerH="window.innerHeight"; offsetX="window.pageXOffset"; offsetY="window.pageYOffset"; } else { horz=".pixelLeft"; vert=".pixelTop"; docStyle=""; styleDoc=".style"; innerW="document.body.clientWidth"; innerH="document.body.clientHeight"; offsetX="document.body.scrollLeft"; offsetY="document.body.scrollTop"; } } function checkLocation() { objectXY="branding"; var availableX=eval(innerW); var availableY=eval(innerH); var currentX=eval(offsetX); var currentY=eval(offsetY); x=availableX-(imgwidth+30)+currentX; y=availableY-(imgheight+20)+currentY; evalMove(); setTimeout("checkLocation()",10); } function evalMove() { eval(docStyle + objectXY + styleDoc + horz + "=" + x); eval(docStyle + objectXY + styleDoc + vert + "=" + y); } // End --> </script> </head> <!-- STEP TWO: Add this onLoad event handler to the BODY tag --> <body onload="setVariables(); checkLocation();"> <!-- STEP THREE: Put this code into the BODY of your HTML document --> <div id="branding" style="position:absolute; visibility:show; left:235px; top:-50px; z-index:2"> <table width="10" bgcolor="#ffffff"><td> <a href="http://www.rbarclay.co.uk/specials/" onmouseover="window.status='Click here for current specials';return true" onmouseout="window.status=';return true"><img alt="" src="http://www.rbarclay.co.uk/logo.jpg" border="0"/></a></td> </table> </div> </body>
September 8, 200620 yr does anyone know if this can be done without using JavaScript? I'm keen to know if it can be done with just CSS - I'm sure I read ages ago somewhere online that it could be done with CSS. I want to do a menu that follows you as you scroll through a website, but don't want to use JavaScript.
September 9, 200620 yr See if you can find some help in the following links dhtml.discoveryvip.com/ http://simplythebest.net/scripts/DHTML_scr..._script_74.html http://merhl.com/webdevblog/index.php?itemid=8&catid=3 (done with Flash) Hope this helps.
September 17, 200620 yr Oh this is javascript? I do not know anything about javascript. And i dont want to know. Because i hate programming.
September 22, 200620 yr Oh this is javascript? I do not know anything about javascript. And i dont want to know. Because i hate programming. why reply?
October 7, 200620 yr could i do that using html? say, for instance i want the center part of my page not to follow my scroll (since that's where my posts are located) but the sides will be following the scroll since that's where my profile, pictures and links are. thanks.
October 8, 200620 yr could i do that using html? say, for instance i want the center part of my page not to follow my scroll (since that's where my posts are located) but the sides will be following the scroll since that's where my profile, pictures and links are. thanks. Generally that would be done using an iframe... but even then, I'm not sure that the outside scrolling and the inside *not* scrolling would be possible. I'll be watching to see, though!
April 4, 201214 yr <img alt="" src="http://www.rbarclay.co.uk/logo.jpg" border="0"/> I have underlined the portion of the code where you would put your image URL. I hope this helps - Good luck.
April 6, 201214 yr how do you do the floating image so as you scroll up or down a page the image follows you? add to style property: style="position: fixed;"
Create an account or sign in to comment