jagguy
asked on
table css override
Hi,
How do I overrride the table css as below which work for every table on the website? I have another table which
I want to display another way
How do I overrride the table css as below which work for every table on the website? I have another table which
I want to display another way
table, th ,td{
border-bottom: 1px solid lightblue;
border-bottom: 1px solid blue;
font-size: .93em; /* 14px/16=0.875em */
font-family: "Arial", Times, serif;
font-weight: bold;
// color: #666666;
// background-color: lightgreen;
//color:red;
}
tr {
vertical-align: bottom;
}
th {
background-color: lightblue;
color: black;
}
.td1{
color: #3399ff
}
ASKER
This is not working.
I want to have the same table,tr css and only for the odd table add a class so I can override the default table css.
For example i cant remove the blue border from the style2/3 table as it always picks up the tr css
I want to have the same table,tr css and only for the odd table add a class so I can override the default table css.
For example i cant remove the blue border from the style2/3 table as it always picks up the tr css
table, th ,td{
border-bottom: 1px solid blue;
font-size: .93em; /* 14px/16=0.875em */
font-family: "Arial", Times, serif;
font-weight: bold;
}
style2.table, style2.th ,style2.td{
border: none;
font-size: .93em; /* 14px/16=0.875em */
font-family: "Arial", Times, serif;
}
style3.tr {
border-bottom: 1px solid red;
font-size: .93em; /* 14px/16=0.875em */
font-family: "Arial", Times, serif;
}
echo '<table class="style2" >';
echo '<tr class="style3">';
echo '<td>';
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
sorry your explanation just isnt working.
For example I just dont get any css now when I set the table to.
It just doesnt pick anything up
For example I just dont get any css now when I set the table to.
It just doesnt pick anything up
style1.table {
background-color: red;
color:greenyellow;
}
style1.tr {
border-bottom: 1px solid red
}
echo '<br><table class="style1">';
echo '<tr> <td>';
ASKER
ok wait if I reversed the command it works
table.style1
table.style1
Say style1 and style2.
table.style1 (continue styles as above)
Do the same for style 2.
In the table tags be sure to add class="style 1or 2"☺