এলাইন (Align) | সি এস এস বাংলা টিউটোরিয়াল

এলাইন (Align)

ওয়েব পেজের লে-আউট তৈরির ক্ষেত্রে এলাইন অত্যন্ত গুরুত্বপূর্ণ বিষয়। একটা ওয়েব পেজে ওয়েব সাইটটি কোন দিকে প্রদর্শিত হবে ডান দিকে বাম দিকে না মাঝখানে তা যেমন এলাইন করে নির্ধারণ করা হয়, এছাড়া সাইডবার নেভিগেশন বার, ফুটার, হেডার ইমেজের পজিশনও এলাইন করে নির্ধারণ করা হয়। এলাইন করার বেশ কিছু পদ্ধতি রয়েছে। যেমন;

  • মার্জিন প্রোপার্টি দ্বারা এলাইন
  • পজিশন প্রোপার্টি দ্বারা এলাইন
  • ফ্লট প্রোপার্টি দ্বারা এলাইন

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

<html>
<head>
<title> www.tutohost.com</title>
<style>
body{background:#FFD;
font-family:Arial, Helvetica, sans-serif;
font-size:13px;
color:#066;
text-align:justify;}
div{width:200px;
height:250px;
border:#099 10px solid;
padding:8px;
outline:#063 1px solid;}
#rap1{background:#F99;
margin-left:auto;
margin-right:auto;}
#rap2{background:#C9F;
position:absolute;
left:0px;}
#rap3{background:#b0e0e6;
float:right;
right:0px;}
</style>

</head>
<body >
<div id="rap1">
<h2 style="color:#666;">Center align</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>
<br />
<div id="rap2">
<h2 style="color:#666;">Left align</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="rap3">
<h2 style="color:#666;">Right align</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 করলে নিচে প্রদর্শিত ছবির মত দেখাবে।


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

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