Thursday 21 September 2017

How to Make html-tables attractive by using 3 lines of Css code

Tables in html

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>TABLES</title>
<style> 
TABLE
{ width:100%;
text-align:center;
background-color:#963;
}
TD
{
padding:10PX;
}
TD:HOVER
{
background-color:WHITE;
COLOR:#963;

}

</style>


</head>

<body>


<table border="13PX SOLID BLACK" > 

<TR> 
<TD>NAME </TD>
<TD> CLASS</TD>
<TD>TIMING </TD>

</TR>


<TR> 
<TD> Salman</TD>
<TD> MCS</TD>
<TD>9:00 AM - 10:00 AM </TD>

</TR>


<TR> 
<TD> Raza</TD>
<TD> BSCS</TD>
<TD>9:00 AM - 10:00 AM </TD>

</TR>

<TR> 
<TD> Arsalan</TD>
<TD> MCS</TD>
<TD>3:00 pM - 5:00 pM </TD>

</TR>
<TR> 
<TD> Muzammil</TD>
<TD> BESE</TD>
<TD>9:00 AM - 10:00 AM </TD>

</TR>










</table>




</body>
</html>

How to make layout of facebook page part 1 header

HTML CODE:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Facebook-Login or SignUp</title>
<link href="css/style.css" rel="stylesheet" type="text/css"/>
</head>

<body>
<div id="wrapper">

<header>
<div class="cheader" > 
<div style="width:20%;height:100px;float:left"> </div>
<div style="width:80%;height:100px;float:left "> 
<img src="img/Facebooklogo.png" style="width:50%;height:100px"/>
</div>
</div>

<div class="cheader" > 

<div class="cheader2">
<p>Email or Phone 
<br/>
<input type="text"/>

</p>
 </div>
<div class="cheader2"> 
<p>Password
<br/>
<input type="password"/>

</p>
</div>
<div class="cheader2"> 
<button style="background-color:rgb(59,89,152);color:white;margin-top:35px;"> Login</button>
</div>
<div class="cheader2"> </div>

</div>

 </header>

<div id="maincontent"> </div>

<div id="footer"> </div>


</div>


</body>
</html>

CSS CODE:

@charset "utf-8";
/* CSS Document */

body
{ margin:0 auto;
padding:0px;
}
#wrapper
{
width:100%;
height:auto;
background-color:#999; 
}
header
{
width:100%;
height:100px;
background-color:rgb(59,89,152); 
}
#maincontent
{
width:100%;
height:800px;
background-color:#fff; 
}
#footer

{
width:100%;
height:200px;
background-color:#903; 
}
.cheader
{
width:50%;
height:100px;
float:left;
}
.cheader2
{
width:25%;
height:100px;
float:left;
color:white;
}

Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...