know yourselves. information, computer, 7 wonders, various.

Showing posts with label CSS. Show all posts
Showing posts with label CSS. Show all posts

Saturday, March 14, 2020

css_part30




CSS Table এর ব্যবহার
আমারা HTML অংশে টেবিল সমন্ধে বিস্তারিত আলোচনা করেছি । এখন কিভাবে CSS  ব্যবহার করে টেবিল নির্ধারন করা যায় সেটিই  দেখবো। নিশ্চয়ই মনে আছে  <table>……</table> ট্যাগ দিয়ে টেবিল তৈরী করতে  হয় । th দ্বারা টেবিল হেডিং td দ্বারা টেবিল ডাটা ও tr দ্বারা টেবিল রো তৈরী করা হয় । এছাড়া আমরা টেবিল বর্ডার ও ব্যাকগ্রাউন্ড ইত্যাদি সংযোজন করতে পারি । এগুলিই আমরা CSS দ্বারা নির্ধারন করবো  চলুন  ডিফল্ট Black বর্ডার দিয়ে একটি টেবিল তৈরী করা যাক, নিচের মত প্রোগ্রাম তৈরী করুন। তবে এখানে লক্ষ্য করে থাকবেন double border দেখা যাবে কারন এখানে td ও th এ আলাদা আলাদা বর্ডার দেখাবে।

নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<head>
<title> CSS Table ElementBoder extra element.</title>
<style>
table,th,td
{border:1px solid black;}
</style>
</head>
<body>
<table>
<tr> <th>Firstname</th> <th>Lastname</th> </tr>
<tr> <td>Bappi</td> <td>Ashraf</td> </tr>
<tr> <td>Mebin</td> <td>Jahan</td> </tr>
</table>
</body>
</html>
ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।

Single Border তৈরী করা
Border এর সাথে Collapss প্রোপার্টিজ ব্যবহার করে Single বর্ডার তৈরী করা যায়। নিচের মত প্রোগ্রাম লিখুন।

নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<head>
<title> CSS Table ElementBoder extra element.</title>
<style>
table{border-collapse:collapse;}
table, td, th{border:2px solid red;}
</style>
</head>
<body>
<table>
<tr> <th>Firstname</th> <th>Lastname</th> </tr>
<tr> <td>Bappi</td> <td>Ashraf</td> </tr>
<tr> <td>Mebin</td> <td>Jahan</td> </tr>
</table>
</body></html>

ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।

টেবিলের Width ও Height
আমার ইচ্ছে করলে টেবিলের height বা width কে নিদিষ্ট করে দিতে পারি । height বা width প্রোপার্টিজ দিয়ে এবং value  হিসাবে pixel (px) বা percent (100%) দিতে হয় । নিচের মত প্রোগ্রাম তৈরী করুন।

নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<head>
<title> CSS Table ElementBoder extra element.</title>
<style>
table { border-collapse:collapse; }
table,td,th { border:2px solid black; }
table { width:100%; }
th { height:50px; }
</style>
</head>
<body>
<table>
<tr> <th>Firstname</th> <th>Lastname</th>
 <th>Credits</th> </tr>
<tr> <td>Bappi</td> <td>Ashraf</td>
<td>Tk.5000/= </td> </tr>
<tr> <td>Mebin</td> <td>Jahan</td>
<td>Tk.5500/= </td> </tr>
<tr> <td>Selina</td> <td>Begum</td>
<td>Tk.7000/= </td> </tr>
</table>
</body>
</html>
</html>
ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।

Table এর Text Align (Horizontal & Vertical)
অন্যান্য ক্ষেত্রে Text Align যেভাবে ব্যবহৃত হয় এখানেও  সেরকম। সাধারন Align বলতে Horizontal Align বোঝায়। এর Value হবে left, right ও center। Vertical Align এর জন্য Vertical Align ব্যবহৃত হয় এবং Value  হবে  top, bottom বা middle. নিচের মত প্রোগ্রাম তৈরী করুন।

নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<head>
<title> CSS Table ElementBoder extra element.</title>
<style>
table { border-collapse:collapse; }
table, td, th { border:1px solid black; }
td { height:50px; text-align:right;
vertical-align:bottom; }
</style></head>
<body>
<table>
<tr> <th>Firstname</th> <th>Lastname</th>
<th>Credits</th> </tr>
<tr> <td>Bappi</td> <td>Ashraf</td>
<td>Tk.5000/= </td> </tr>
<tr> <td>Mebin</td> <td>Jahan</td>
<td>Tk.5500/= </td> </tr>
<tr> <td>Selina</td> <td>Begum</td>
<td>Tk.7000/= </td> </tr>
</table>
</body>
</html>
ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।

Padding এবং Color
টেবিলে ব্যাকগ্রাউন্ড কালার ও Padding ও Caption দেওয়া সম্ভব ।

নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<head>
<title> CSS Table ElementBoder extra element.</title>
<style>
table { border-collapse:collapse; }
table, td, th { border:1px solid green; }
td { padding:15px; }
th { background-color:green; color:white; }
caption {caption-side:bottom;}
</style></head>
<body>
<table>
<caption>This is Sample Table Caption</caption>
<tr> <th>Firstname</th> <th>Lastname</th>
 <th>Credits</th> </tr>
<tr> <td>Bappi</td> <td>Ashraf</td>
<td>Tk.5000/= </td> </tr>
<tr> <td>Mebin</td> <td>Jahan</td>
<td>Tk.5500/= </td> </tr>
<tr> <td>Selina</td> <td>Begum</td>
<td>Tk.7000/= </td> </tr>
</table></body></html>
ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।
Previous Post                                                                                           Next Post

  বিস্তারিত জানতে নিচের বইটি সংগরহ করে নিন।

Book Name: Mastering Microsoft  Word
Writer: Bappi Ashraf
Published By: Gyankosh Prokashani
Amount of Pages: 464
First Publish: October-2004
Last Edition: We've February-2015 edition. Future edition may be existed!
Book Price: BDT 350 (30% Discount)
 The writer of this book has told that he has written this book with the concept of "teach yourself". On the other hand, Web Design is a thing which is interesting to learn. He has also told that the book is full of fan and enjoyment so that a person can learn Web Design by himself by playing with the example projects of this book.  Book's CD Link below... 

 cd

RELATED POST LINKS BELOW ********************************************
Next_

css_part27


একাধিক Properties ব্যবহার
Outlineএ একসাথে একাধিক Property ও Value ব্যবহার করা যাবে। এতে কোডিং ও ছোট হবে। যেমন নিচের প্রোগ্রাম লক্ষ্য করুন।

নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<head> <title> CSS outline properties </title>
<style>
p{border:5px solid red;outline:5px green double;}
</style>
</head>
<body>
<p>Nova Computer.</p>
</body>
</html>
ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।



CSS Margin এর ব্যবহার
বর্ডার বা আউটলাইনের বাইরে ফাঁকা জায়গা রাখার জন্য margin ব্যবহার করা হয়। মার্জিনের কোন brackground color নাই এবং এটি স্বচ্ছ। তবে {Body} ট্যাগের মধ্যে color ব্যবহার করলে এখানে কালার আসবে। এজন্য আলাদা div নিয়ে মার্জিন দেওয়া উচিত । মার্জিনের value হিসাবে auto. length (cm,px ইত্যাদি) বা present (%) ব্যবহার করা হয়। border এর properties মত এগুলি হুবুহু এক, যেমন margin-top, margin-bottom, margin-left, margin-right এভাবে property ব্যবহার করে আলাদা  আলাদা মার্জিন দেওয়া যায়। আবার শুধু margin প্রোপার্টির সাথে ১ থেকে ৪টি value দিয়ে আলাদা আলাদা মার্জিন দেওয়া যায়।
যেমন margin:10px 20px 30px  40 px (px বা cm বা in) দিলে উপরে 10px ডানে 20px  নিচে 30px ও বামে 40px ফাঁকা জায়গা রাখবে।
margin: 10 px, 20 px 30px দিলে উপরে 10px ডানে ও বামে 20px এবং নিচে 3 px ফাঁকা রাখবে
margine:10px 20px দিলে উপর ও নিচে 10px এবং ডানে ও বামে 20px ফাঁকা রাখবে
margin; 25px দিলে ৪ দিকেই 25px ফাঁকা জায়গা রাখবে। মার্জিনে  Negative value দেওয়া যায়।
চলুন নিচের মত প্রোগ্রাম তৈরী করে বিষয়টি পরীস্কার হওয়া যাক

px ব্যবহারে মার্জিন

নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<head>
<title> CSS margin properties </title>
<style>
div.a
{margin:auto; background-color:yellow;
border:5px solid red; outline:5px green double;}
div.b
{margin:25px; background-color:yellow;
border:5px solid red; outline:5px green double;}
div.c
{margin:100px; background-color:yellow;
border:5px solid red; outline:5px green double;}
div.d
{margin:10px 5px 15px 50px; background-color:yellow;
border:5px solid red; outline:5px green double;}
</style>
</head>

<body>
<div class="a">This is Nova Computer. This is Nova Computer. This is Nova Computer. This is Nova Computer.</div>
<div class="b">This is Nova Computer. This is Nova Computer. This is Nova Computer. This is Nova Computer.</div>
<div class="c">This is Nova Computer. This is Nova Computer. This is Nova Computer. This is Nova Computer.</div>
<div class="d">This is Nova Computer. This is Nova Computer. This is Nova Computer. This is Nova Computer.</div>
</body>
</html>



ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।


Persent (%) ব্যবহারে মার্জিন
এখন একই প্রোগ্রাম px এর বদলে % ব্যবহার করে তৈরী করবেন।

নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন।
<style>
div.a
{margin:10%; background-color:yellow;
border:5px solid red; outline:5px green double;}
div.b
{margin:20%; background-color:yellow;
border:5px solid red; outline:5px green double;}
div.c
{margin:10% 20% 15% 5%; background-color:yellow;
border:5px solid red; outline:5px green double;}
div.d
{margin:10% 20%; background-color:yellow;
border:5px solid red; outline:5px green double;}
</style>
</head>
<body>
<div class="a">This is Nova Computer. This is Nova Computer. This is Nova Computer. This is Nova Computer.</div>
<div class="b">This is Nova Computer. This is Nova Computer. This is Nova Computer. This is Nova Computer.</div>
<div class="c">This is Nova Computer. This is Nova Computer. This is Nova Computer. This is Nova Computer.</div>
<div class="d">This is Nova Computer. This is Nova Computer. This is Nova Computer. This is Nova Computer.</div>
</body>
</html>
ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।


cm ব্যবহারে মার্জিন
উপরের প্রোগ্রামটি এখন % এর বদলে cm (centi meter) ব্যবহার করে লিখবো।

নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন।
<!DOCTYPE html>
<html>
<head>
<style>
div.a {margin:.5cm; background-color:yellow;
border:5px solid red; outline:5px green double;}
div.b {margin:2cm; background-color:yellow;
border:5px solid red; outline:5px green double;}
div.c{margin:1.5cm 2cm .5cm 3cm; background-color :yellow;border:5px solid red; outline:5px green double;}
</style></head>
<body>
<div class="a">This is Nova Computer. This is Nova Computer. This is Nova Computer. This is Nova Computer.</div>
<div class="b">This is Nova Computer. This is Nova Computer. This is Nova Computer. This is Nova Computer.</div>
<div class="c">This is Nova Computer. This is Nova Computer. This is Nova Computer. This is Nova Computer.</div>
</body></html>ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।
Previous Post                                                                                           Next Post

  বিস্তারিত জানতে নিচের বইটি সংগরহ করে নিন।

Book Name: Mastering Microsoft  Word
Writer: Bappi Ashraf
Published By: Gyankosh Prokashani
Amount of Pages: 464
First Publish: October-2004
Last Edition: We've February-2015 edition. Future edition may be existed!
Book Price: BDT 350 (30% Discount)
 The writer of this book has told that he has written this book with the concept of "teach yourself". On the other hand, Web Design is a thing which is interesting to learn. He has also told that the book is full of fan and enjoyment so that a person can learn Web Design by himself by playing with the example projects of this book.  Book's CD Link below... 

 cd

RELATED POST LINKS BELOW ********************************************

       Next_


Part- 02:  Inline Style






css_part26



একসাথে সব প্রোপার্টিজ এর ব্যবহার
একসাথে সব প্রোপার্টি ব্যবহার করা যাবে। এতে কোডিংও  ছোট হবে। তবে একটি অর্ডার জানতে হবে। Value নির্ধারণের জন্য শর্ট অর্ডার হবে border-width, border–style border-color
নিচের মত একটি প্রোগ্রাম তৈরী  করে দেখুন
নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন। 
<!DOCTYPE html>
<html>
<head><title> CSS border properties </title>
<style>
p.a {border:thin solid red;}
p.b {border: medium dotted blue;}
p.c {border:thick dashed #000000;}
p.d {border:5px solid red;}
p.e {border:5px solid;border-color:red green
blue purple;}
p.f {border-style:ridge; border-width:20px;
border-color:red </style>
</head>
<body>
<p class="a">Nova Computer.</p>
<p class="b">Nova Computer.</p>
<p class="c">Nova Computer.</p>
<p class="d">Nova Computer.</p>
<p class="e">Nova Computer.</p>
<p class="f">Nova Computer.</p>
</body></html>

ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।




CSS Outline এর ব্যবহার
Outline হচ্ছে এক ধরণের line এটি বর্ডারের বাইরে একটি line তৈরী করে। এটির value গুলো Border এর মতই হুবুহু এক এবং প্রোপার্টিজগুলো একই। যেমন style, color এবং width. এটিতে color value তে invert একটি অতিরিক্ত value যোগ হয়েছে। একটি কাল line তৈরী করে এটি দ্বারা চলুন কয়েকটি প্রোগ্রাম তৈরী করা যাক, তবে বর্ডারের মত এটি কোন এলিমেন্টের ডাইমেনশন যোগ করে না বিধাই width height এর সাথে এর কোন সর্ম্পক নাই।
Outline Style প্রোপার্টি
এটা Border এর border–style এর মত হুবুহু এক।নিচের মত একটি প্রোগ্রাম তৈরী  করে দেখুন

নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন। 
<!DOCTYPE html>
<html>
<head>
<title> CSS outline properties </title>
<style>
p.a {border:2px solid red; outline-style:none;}
p.b {border:2px solid red; outline-style:dotted;;}
p.c {border:2px solid red; outline-style:dashed;}
p.d {border:2px solid red; outline-style:solid;}
p.e {border:2px solid red; outline-style:double;}
p.f {border:2px solid red; outline-style:groove;}
p.g {border:2px solid red; outline-style:ridge;}
p.h {border:2px solid red; outline-style:inset;}
p.i {border:2px solid red; outline-style:outset;}
</style>
</head>
<body>
<p class="a">Nova Computer.</p>
<p class="b">Nova Computer.</p>
<p class="c">Nova Computer.</p>
<p class="d">Nova Computer.</p>
<p class="e">Nova Computer.</p>
<p class="f">Nova Computer.</p>
<p class="g">Nova Computer.</p>
<p class="h">Nova Computer.</p>
<p class="i">Nova Computer.</p>
</body>
</html>

ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।




Outline Color প্রোপার্টি
এটি দ্বারা Outline এর কালার নির্ধারণ হয়। border-color এর মত হুবুহু এক তবে Invert নামে নতুন একটি Value এখানে সংযুক্ত হয়েছে।
নিচের মত একটি প্রোগ্রাম তৈরী  করে পার্থক্য দেখুন

Program_CSS075
নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন। 
<!DOCTYPE html>
<html>
<head>
<title> CSS outline properties </title>
<style>
p.a {border:2px solid red; outline-style:dotted;
outline-color:red;}
p.b {border:2px solid red; outline-style:dashed;
outline-color:blue; }
p.c {border:2px solid red; outline-style:solid;
outline-color:#000000;}
p.d {border:2px solid red; outline-style:double;
outline-color:#ff9900;}
p.e {border:2px solid red; outline-style:groove;
outline-color:rgb(255,255,111);}
p.f {border:2px solid red; outline-style:ridge;
outline-color:rgb(255,255,255);}
p.g {border:2px solid red; outline-style:solid;     
     outline-color:invert;}
</style>
</head>
<body>
<p class="a">Nova Computer.</p>
<p class="b">Nova Computer.</p>
<p class="c">Nova Computer.</p>
<p class="d">Nova Computer.</p>
<p class="e">Nova Computer.</p>
<p class="f">Nova Computer.</p>
<p class="g">Nova Computer.</p>
</body>
</html>


ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।



Outline- Width
একইভাবে border-width এর মত outline-width কে ব্যবহার করা হয়। নিচের মত একটি প্রোগ্রাম তৈরী করুন।
Program_CSS076
নিচের মত কোডিংসহ আরও একটি HTML ফাইল তৈরী করুন। 
<html>
<head><title> CSS outline properties </title>
<style>
p.a {border:2px solid green; outline-style:solid;
outline-color:red; outline-width:thin;}
p.b {border:2px solid red; outline-style:solid;
outline-color:blue; outline-width:medium;}
p.c {border:2px solid red; outline-style:solid;
outline-color:#000000; outline-width:thick;}
p.d {border:2px solid red; outline-style:double;
outline-color:#ff9900;outline-width:1px;}
p.e {border:2px solid red; outline-style:groove;
   outline-color:rgb(255,255,111);outline-width:10px;}
p.f{border:2px solid red; outline-style:ridge;
  outline-color:rgb(255,255,255); outline-width:20px;}
</style></head>
<body>
<p class="a">Nova Computer.</p>
<p class="b">Nova Computer.</p>
<p class="c">Nova Computer.</p>
<p class="d">Nova Computer.</p>
<p class="e">Nova Computer.</p>
<p class="f">Nova Computer.</p>
</body></html>
ব্রাউজার দিয়ে খুললে নিচের মত ফলাফল পাওয়া যাবে।


Previous Post                                                                                           Next Post

  বিস্তারিত জানতে নিচের বইটি সংগরহ করে নিন।

Book Name: Mastering Microsoft  Word
Writer: Bappi Ashraf
Published By: Gyankosh Prokashani
Amount of Pages: 464
First Publish: October-2004
Last Edition: We've February-2015 edition. Future edition may be existed!
Book Price: BDT 350 (30% Discount)
 The writer of this book has told that he has written this book with the concept of "teach yourself". On the other hand, Web Design is a thing which is interesting to learn. He has also told that the book is full of fan and enjoyment so that a person can learn Web Design by himself by playing with the example projects of this book.  Book's CD Link below... 

 cd

RELATED POST LINKS BELOW ********************************************
Next_


Part- 02:  Inline Style