NOTE: This is a collection of information and links collected over the years that might provide useful information. A Safer Company LLC does not guarantee, endorse or approve any of these links or their scripts. Use these links to other websites at your own risk.
CSS Floating Image
Using CSS, you can set up an image or text in a division and css with a fixed position. The fixed position will always be in the exact location. For example: look at the top and you will see the A Safer Company logo displayed in a black box. When you scroll down, the image and box will remain in the exact location. It can be annoying since it can cover up text that you may be trying to read.
Example:
Wrap the section that you want to float in a <div id="floatsection"> </div>
<div id="floatsection"> <img src="/images/ASC - no background copy2.gif" alt="asc" width="100" height="87" /> </div>
Set up the following css to give the division a fixed position:
<style type="text/css"> <!-- #floatsection{ display:block; position:fixed; z-index:10; width:120px; padding: 10px; top: 250px; background-color:#000; color:#FFF; } --> </style>
Scroll down to see what this image does.
Page last updated: May 31, 2012 10:25 AM
Content and Navigation...