how to style table in css code example
Example 1: table border css
table, th, td {
border: 1px solid black;
}
Example 2: table css
tr , th , td {
border: 1px solid black;
padding: 5%;
text-align: center;
}
Example 3: css style for form and table
table, th, td {
padding: 1.5%;
border: 1px solid white;
text-align: center;
}
button{
width: 100%;
height: 100%;
padding: 2px ;
margin: 2px;
}
body {
background-image: url(https://images.unsplash.com/photo-1574375927938-d5a98e8ffe85?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1949&q=80);
height: 100%;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
color: honeydew;
}
.h1-header, h1{
text-align: center;
width: 100%;
height: 70px;
font-size: 14px;
padding-top:0px ;
}
h1 {
font-size: 36px;
font-style: italic;
}
.form1 {
float: left;
width: 20%;
height: 300px;
margin: 150px 0 0 200px;
background-color: #3a303099;
}
.form1 #form {
color: honeydew;
}
form{
padding: 50px;
}
.table {
width: 35%;
margin: 150px 200px 0 800px;
}
table{
padding: 50px 120px;
}