Hvem tilbyr Forbrukslån | Puhelinliittymä vertailu | Kredittkort med Fordeler | Bytte Strømleverandør | Sammenlign Innbruddsalarm | Arbeidsledighetsforsikring | Mobilselskaper | Billig Rørlegger
CSS

CSS Table Width and Height

The first case to consider is the design of the table, the table is much wider, and its height will be how much, as well as table headers in the first row of each cell would be like. How to determine width and height of the table to write the style sheet,

table
{
width:300px; height:100px;
}

As well as be given in pixels or as a percentage of the pages settings Can px,

table
{
width:50%; height:20%;
}

As a percentage of the value of the table are resized according to the size of the monitor, but it will not change the value of pixels.
As well as the first row of the table headers to determine the height of each cell to write the style sheet,

th
{
height:50px;
}

Again px settings as well as pixels or as a percentage of the pages can be given. Usually the first row of the table headers as well as the height of each cell to determine if the cell is determined by the width of the size of the table.

Practice Project:

<html>
<head>
<title> www.trickbd.com.bd</title>
<style>
body{background:#00CC99;margin-left:120px; }
table{
border-collapse:collapse;
}
table,th,td
{
border:1px solid #F00;
}
table
{
width:300px; height:100px;
}

th
{
height:50px;
}

</style>
</head>
<body >
<table>
<tr>
<th>SL</th>
<th>Book</th>
<th>Pen</th>
<th>Box</th>
</tr>
<tr>
<td>01</td>
<td>100</td>
<td>200</td>
<td>400</td>
</tr> <tr>
<td>02</td>
<td>300</td>
<td>600</td>
<td>300</td>
</tr>
</table>
</body>
</html>

Notepad to open a file type from the menu at the top of layer code by clicking on the Save as File name: index.html, Save as type: All files, save and open the index.html file with the Mozilla Firefox look like the image shown below.

 

Comments

comments

About the author

Toriqul Islam Tusher

বলার মত কিছু নাই!

Leave a Comment