ফ্লোটিং (Floating)| সি এস এস বাংলা টিউটোরিয়াল

ফ্লোটিং (Floating)

ওয়েব পেজের লে-আউট তৈরির ক্ষেত্রে পেজের বিভিন্ন উপাদানকে ডানদিকে এবং বামদিকে রাখার প্রয়োজন পরে। এক্ষেত্রে ফ্লট (Float) ব্যবহার করা হয়। কোন উপাদানকে বামদিকে স্থাপন করার জন্য Declaration করতে হয় float:left; আর বামদিকে স্থাপন করার জন্য Declaration করতে হয় float:right; ।




অনুশীলন প্রজেক্ট

<html>
<head>
<title> www.tutohost.com</title>
<style>
body{background:#FFD;
font-family:Arial, Helvetica, sans-serif;
font-size:13px;
text-align:justify;}
div{width:180px;
border:#F5D349 10px solid;
padding:8px;
background:#FEEFB3;
outline:#F60 1px solid;}
#first{float:left;}
#second{float:right;}
</style>

</head>
<body >
<div id="first">
<h2 style="color:#C33;">Float Left <br />First Box.</h2>
<hr>
<p>
We are bangladeshi Hostgator hosting provider. The world wide technical and support team is working for your best movement. We are bangladeshi Hostgator hosting provider. The world wide technical and support team is working for your best movement. </p>
</div>
<div id="second">
<h2 style="color:#C33;">Float Right<br /> Second Box.</h2>
<hr>
<p>
We are bangladeshi Hostgator hosting provider. The world wide technical and support team is working for your best movement. We are bangladeshi Hostgator hosting provider. The world wide technical and support team is working for your best movement. </p>
</div>
</body>
</html>

একটা  নোটপ্যাড  open  করে  উপরের code  টুকু  লিখে  file  মেনু  থেকে  Save as এ ক্লিক করে File name:  index.html  ,   Save as type : All files,  দিয়ে save করে index.html ফাইলটি Mozilla Firefox দিয়ে open করলে নিচে প্রদর্শিত ছবির মত দেখাবে।



লেখকঃ অসীম কুমার
তিনি ইলেকট্রিক্যাল ইঞ্জিনিয়ারিং এ লেখাপড়া করছেন। টিউটোরিয়ালবিডি ও বিজ্ঞানপ্রযুক্তি ব্লগে তিনি ইলেক্ট্রনিক্স সহ বিভিন্ন টেকনোলজি বিষয়ে লিখে থাকেন। বর্তমানে তিনি লেখাপড়ার পাশাপাশি টিউটোহোস্টে কর্মরত আছেন।

কপি রাইট © ২০১১থেকে যতদিন চলবে সর্বস্বত্ত্ব সংরক্ষিত