Pages - পৃষ্ঠাসমূহ

Fixed float element using Jquery and CSS in entire webpage

Fixed float menu is used in like contact us page, feedback page, menu , bookmark toolbar etc. Creating fixed float menu we use jquery and simple css. After this we decorate with css.It is not very traft only get the tricks how to create fixed float menu. This shows fixed floating menu using Jquery and CSS.

If you want to animated float menu you can learn this tutorial creating float menu using jquery
Hide Example Show Example

Our final output screenshot

Fixed float menu using jquery

It is easily done using jquery and decorate using css. It is a simple task to using 2 single lines of jquery.Now see the code. It only shows the floating menu animate and scroll with the page.If you need to learn with fixed the float menu when scolling the page, you can see creating float menu using jquery
<html>
<head>
<title>the title</title>
   <script type="text/javascript"    src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
   <script type="text/javascript" language="javascript">
  
   $(document).ready(function(){
 
  menuYloc =200; 
  Y=menuYloc+"px";
  $(window).scroll(function () {  
   var offset = menuYloc+$(document).scrollTop()+"px";    
   if(offset>Y){
    $(".demo").stop().css({
      position: 'fixed',
      left: '0',
      top: Y}); 
   }
   
   
  });
  

   });
   </script>   
</head>
<body>
  <div id="header">
 <h1>Fixed float menu
 <link rel="stylesheet" type="text/css" href="style.css" /></h1>
  </div>
  <div class="demo"> 
 
  </div>
  <div id="layout">
  <div class="text">
 <h4>Float menu</h4>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 <h4>Float menu</h4>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 <h4>Float menu</h4>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 <h4>Float menu</h4>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
 This posts show how to create a float menu using jquery and css  entire a webpage.<br/>
  </div>
  </div>




style.css

  body{
   min-width:900px;   
   margin:0 auto;
   position:relative;
   background:#193D36;
  }
  #header{
   width:100%;
   height:150px;
   background:#7A1616;
   margin-bottom:30px;
  }
  #header h1{
   width:700px;
   padding-top:30px;
   margin:0 auto;
   color:white;
  }  
  .demo{
   width:60px;
   position:fixed;
   left:0px; 
   
   background:url("contact.jpg") no-repeat;
   height:185px;
  }
  #layout{
   width:700px;
   margin:0 auto;
  }
  .text{
   width:700px;
   padding:20px;
   background:#f6f6f6;
   color:gray; 
  }

No comments:

Post a Comment