SiteExperts.com Logo Home | Community | Developer's Paradise | Jobs
User Groups | Site Tools | Site Information | Search

Inside Technique : Steve's Behaviors : float Behavior

The float behavior makes it easy to . In Internet Explorer 5.0, the paragraph below fades into view. In all other browser, the paragraph is properly displayed and the behavior is ignored.

The float behavior (demonstration is to the right) expose startX and startY properties which signify the initial positions (these can also be set in the style property, but it degrades better this way). It also supports smooth which when set to false, disables the incremental movement, it just plops it on the correct spot. speed is the number of pixels to move per second and stick when set to true, disables the movement.

The above paragraph is wrapped in a DIV and is associated with the move behavior as follows:

<div id=fl1 
     style="behavior: url(float.htc); 
            width: 150;
            top: 20pt; 
            position: absolute; 
            left: 630; 
            background: peachpuff;  
            border: 1 black solid">
<p>...paragraph...
</div>

This is the FLOAT.htc behavior. It keeps a target element at the same place relative to the current screen.

Discuss and Rate this Article

Page 1:Steve's Behaviors
Page 2:move Behavior
Page 3:fade Behavior
Page 4:bubble Behavior
Page 5:type Behavior
Page 6:switch Behavior
Page 7:over Behavior
Page 8:float Behavior