Create Floating Div using simple css | Sanwebcorner

Create Floating Div using simple css

This post i will tell you how to create floating div using simple Css code. This floating div will help you to give important content in this. I written some style for the floating div you can write and design the particular div according to your best design. This may helpful to give the subscription form, to display important news, or you can provide social sharing buttons to this floating div. This is too simple just write the following code here is i will provide live demo for your reference.



create Floating Div using css

<html>
<head>
<title>How to create Floating Div using css</title>
<style>
.float_div
{
position:fixed;
width:150px;
height:100px;
padding:25px;
background-color:green;
color:#fff;
top:150px;
float:right;
right:0px;
}

p{
line-height:155px;
}
</style>
</head>
<body>
<div class="float_div">
This is floating div:
<p><a href="http://www.sanwebcorner.com">www.sanwebcorner.com</a></p> <br />
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin condimentum erat non auctor vulputate. Proin vestibulum varius maximus. Mauris imperdiet, mi in vestibulum ullamcorper, ante leo eleifend elit, vitae faucibus ligula ante in velit. Suspendisse vel aliquet diam, id pellentesque nunc. Phasellus vitae commodo eros. Aenean vel ligula quis orci scelerisque fermentum vitae in quam. Fusce imperdiet eros a sem luctus pharetra. Aliquam dignissim, enim vel porta eleifend, elit quam vehicula nisi, in luctus ipsum justo et nulla. Ut tincidunt mi id porttitor laoreet. Aenean nec hendrerit ex. Sed sed massa ac nibh rhoncus feugiat. Duis vehicula pretium arcu, vitae ullamcorper ipsum consequat sed. Nulla suscipit fringilla purus, quis pharetra neque vulputate a. Morbi tempor arcu odio, a cursus enim maximus ac. Nullam sit amet tortor mattis arcu commodo ullamcorper at vel turpis. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>

<p>Duis nec pulvinar lectus, eget ultricies urna. In sit amet mattis leo, vel efficitur ipsum. Phasellus lobortis rutrum nibh, eu rutrum dui venenatis eu. Nulla a luctus tortor, sed convallis tellus. Phasellus neque tortor, auctor a rutrum et, molestie eu lectus. Pellentesque eu sem consequat, fringilla mauris eget, hendrerit lectus. Aenean felis tellus, tincidunt vel ante a, congue molestie ante. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Ut eu massa in libero tempor tristique. Aliquam vehicula velit eget mi ornare, et lacinia elit iaculis. Vivamus mollis tincidunt lectus sit amet semper. Proin vitae sem sagittis, sollicitudin velit nec, imperdiet dui. Quisque ut justo vitae enim euismod volutpat. Aliquam interdum ac erat in ornare.</p>

<h2><a href="http://www.sanwebcorner.com">www.sanwebcorner.com</a></h2>
</body>
</html>

Post a Comment

Labels

360 degree view product image 3d rotate 3d text 3step-form Accordion menu ajax All Browsers Animated Background Gradient animation audio controller auto complete Best accordion menu bootstrap border bounce effect on hover Breadcrumb calculate age by dob calendar Captcha change image on mouse move color chooser countdown Counter on scroll create random number Css css animation css buttons css hover css3 customized upload Button Date picker delete data from table Different scroll speed email otp verification email verifier Embed eventlist Expanding Menu feedbck form flash news section close button full screen menu Google custom search Google Maps Google reCAPTCHA Google site search gradient hide menu Horizontal News ticker Hover Htm Html html dropdown html form html5 html5 form validation Iframe image hover increment decrement textbox value based on select box Javascript Jquery js Layered image effect on mouse hover lock & unlock page scroll marquee marquee with close button mobile number validation mobile otp login Multi-level-drop-down-menu multi-level-form multi-select-checkbox Multi-Step-form Multiple File Upload in PHP mysql News ticker on hover change text to image our team page password generator password strength checker Photoshop PHP php mailer populate html selectbox Popup image on click the link pure css Question type form random number generate Random password Redirect page Based on the select box while submit the form responsive responsive menu responsive popup box Responsive Vertical Time line design rotate image selectbox based on select box simple coming soon page simple countdown based on end date simple typing effect slider sliding tab sms otp login statistic counter on scroll switch tag shape team member Time picker toggle toggle view transparent button underline animation up down slide validation vertical fixed sidebar Webtips whatsapp link website Youtube