Table CSS left border Issue with CSS Code - css

Far Left borders shows nothing in entire table. how do I fix it in below CSS code ? Border is now showing any of the color all other cells are good.
Below is my existing CSS Code. Thanks in Advance.
#mytable {
padding: 0;
margin: 0;
border-spacing: 0px;
border-collapse: separate;
}
caption {
padding: 0 0 5px 0;
width: 700px;
font: italic 11px"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
text-align: right;
}
th {
font: bold 11px"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
border-top: 1px solid #C1DAD7;
letter-spacing: 2px;
text-transform: uppercase;
text-align: center;
padding: 6px 6px 6px 12px;
background: #CAE8EA url(/images/bg_header.jpg) no-repeat;
}
th.nobg {
border-top: 0;
border-left: 0;
border-right: 1px solid #C1DAD7;
background: none;
}
td {
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
background: #fff;
padding: 6px 6px 6px 12px;
color: #4f6b72;
}
td.alt {
background: #F5FAFA;
color: #797268;
}
th.spec {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #fff url(/images/bullet1.gif) no-repeat;
font: bold 10px"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}
th.specalt {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #f5fafa url(/images/bullet2.gif) no-repeat;
font: bold 10px"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #797268;
}
/* Below CSS is used for jQuery Popup window used for File Upload*/
#fade {
/*--Transparent background layer--*/
display: none;
/*--hidden by default--*/
background: #000;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: .80;
z-index: 9999;
}
.popup_block {
display: none;
/*--hidden by default--*/
background: #fff;
padding: 20px;
border: 20px solid #ddd;
float: left;
font-size: 1.2em;
position: fixed;
top: 50%;
left: 50%;
z-index: 99999;
/*--CSS3 Box Shadows--*/
-webkit-box-shadow: 0px 0px 20px #000;
-moz-box-shadow: 0px 0px 20px #000;
box-shadow: 0px 0px 20px #000;
/*--CSS3 Rounded Corners--*/
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
img.btn_close {
float: right;
margin: -55px -55px 0 0;
}
/*--Making IE6 Understand Fixed Positioning--*/
*html #fade {
position: absolute;
}
*html .popup_block {
position: absolute;
}
<table id="mytable">
<tr>TEST</tr>
<tr>
<td>TEST</td>
<td>TEST</td>
<td>TEST
<td>TEST</td>
</tr>
</table>

If I understand right you want the same border in left td. You can use this:
td:first-child {
border-left: 1px solid #C1DAD7;
}
#mytable {
padding: 0;
margin: 0;
border-spacing: 0px;
border-collapse: separate;
}
caption {
padding: 0 0 5px 0;
width: 700px;
font: italic 11px"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
text-align: right;
}
th {
font: bold 11px"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
border-top: 1px solid #C1DAD7;
letter-spacing: 2px;
text-transform: uppercase;
text-align: center;
padding: 6px 6px 6px 12px;
background: #CAE8EA url(/images/bg_header.jpg) no-repeat;
}
th.nobg {
border-top: 0;
border-left: 0;
border-right: 1px solid #C1DAD7;
background: none;
}
td {
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
background: #fff;
padding: 6px 6px 6px 12px;
color: #4f6b72;
}
td.alt {
background: #F5FAFA;
color: #797268;
}
th.spec {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #fff url(/images/bullet1.gif) no-repeat;
font: bold 10px"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}
th.specalt {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #f5fafa url(/images/bullet2.gif) no-repeat;
font: bold 10px"Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #797268;
}
/* Below CSS is used for jQuery Popup window used for File Upload*/
#fade {
/*--Transparent background layer--*/
display: none;
/*--hidden by default--*/
background: #000;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
opacity: .80;
z-index: 9999;
}
.popup_block {
display: none;
/*--hidden by default--*/
background: #fff;
padding: 20px;
border: 20px solid #ddd;
float: left;
font-size: 1.2em;
position: fixed;
top: 50%;
left: 50%;
z-index: 99999;
/*--CSS3 Box Shadows--*/
-webkit-box-shadow: 0px 0px 20px #000;
-moz-box-shadow: 0px 0px 20px #000;
box-shadow: 0px 0px 20px #000;
/*--CSS3 Rounded Corners--*/
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
}
img.btn_close {
float: right;
margin: -55px -55px 0 0;
}
/*--Making IE6 Understand Fixed Positioning--*/
*html #fade {
position: absolute;
}
*html .popup_block {
position: absolute;
}
td:first-child {
border-left: 1px solid #C1DAD7;
}
<table id="mytable">
<tr>TEST</tr>
<tr>
<td>TEST</td>
<td>TEST</td>
<td>TEST
<td>TEST</td>
</tr>
</table>

Well, you could just add border-left: 1px solid #C1DAD7; to your td definition and maybe change border-collapse: separate; to border-collapse: collapse; in #mytable.
It's also possible to add left border-left: 1px solid #C1DAD7; on entire table in #mytable.

The common solution is to either use :first-child or the adjacent operator: + but these are not supported in IE6. You may need to handle that browser separately for these styles if this is a requirement. (Use conditional comments, maybe?)
Anyway, I've tried to pull out the relevant CSS and assumed some things about the markup to come up with this:
#mytable {
padding: 0;
margin: 0;
border-spacing: 0px;
border-collapse: separate;
border: 1px solid #C1DAD7;
}
td + td, th + th {
border-left: 1px solid #C1DAD7;
}
tr + tr {
border-top: 1px solid #C1DAD7;
}
td {
background: #fff;
padding: 6px 6px 6px 12px;
color: #4f6b72;
}
th {
font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
letter-spacing: 2px;
text-transform: uppercase;
text-align: center;
padding: 6px 6px 6px 12px;
background: #CAE8EA url(/images/bg_header.jpg) no-repeat;
}
<table id="mytable">
<tr>
<th>TEST1</th>
<th>TEST2</th>
<th>TEST3</th>
<th>TEST4</th>
</tr>
<tr>
<td>TEST1</td>
<td>TEST2</td>
<td>TEST3</td>
<td>TEST4</td>
</tr>
</table>

Related

How to move wordpress theme nav menu down

I'm trying to move my nav menu down. It's currently being 75% covered by the admin bar http://3v3rivals.tk
I want to move the nav menu just below the admin bar, with little to no space between the two. I may need to move the header down a bit also.... How would I go about moving my nav menu down?
/************************************************
Main Navigation
************************************************/
#nav-logo {
float: left;
padding: 8px 10px;
max-width: 100px;
}
#nav-main-wrapper {
border-bottom: 1px solid #444;
-ms-box-shadow: 0 4px 10px -3px #000;
-moz-box-shadow: 0 4px 10px -3px #000;
-o-box-shadow: 0 4px 10px -3px #000;
-webkit-box-shadow: 0 4px 15px -5px #000;
box-shadow: 0 4px 10px -3px #000;
float: left;
margin-bottom: 1px solid #888;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 50px;
z-index: 2000;
}
#nav-main {
color: #fff;
font: 700 14px/14px 'Open Sans Condensed', sans-serif;
margin: 0 auto;
text-transform: uppercase;
width: 960px;
height: 50px;
}
ul.nav-main a {
color: #fff;
float: left;
font: 700 14px/14px 'Open Sans Condensed', sans-serif;
padding: 18px;
-moz-text-shadow: 2px 2px 1px #000;
-ms-text-shadow: 2px 2px 1px #000;
-o-text-shadow: 2px 2px 1px #000;
-webkit-text-shadow: 1px 1px 1px #000;
text-shadow: 1px 1px 1px #000;
}
ul.nav-main .menu-item-home {
background: url(images/nav-sep.png) no-repeat right bottom !important;
}
ul.nav-main .menu-item-home a {
color: #fff !important;
font: 700 14px/14px 'Open Sans Condensed', sans-serif;
padding: 18px;
-moz-text-shadow: 1px 1px 1px #000 !important;
-ms-text-shadow: 1px 1px 1px #000 !important;
-o-text-shadow: 1px 1px 1px #000 !important;
-webkit-text-shadow: 1px 1px 1px #000 !important;
text-shadow: 1px 1px 1px #000 !important;
}
ul.nav-main a:hover {
text-decoration: none;
}
#nav-main-left {
float: left;
position: relative;
width: 810px;
}
ul.nav-main {
display: inline;
float: left;
position: relative;
max-width: 710px;
}
ul.nav-main li {
background: url(images/nav-sep.png) no-repeat right bottom;
display: inline;
float: left;
position: relative;
}
ul.nav-main .current-menu-item,
ul.nav-main .current-post-parent {
background: #eee url(images/nav-bg.png) repeat-x bottom;
}
ul.nav-main li:hover {
background: #eee url(images/nav-bg.png) repeat-x bottom !important;
}
ul.nav-main .current-menu-item a,
ul.nav-main .current-post-parent a {
color: #000;
float: left;
font: 700 14px/14px 'Open Sans Condensed', sans-serif;
padding: 18px;
-moz-text-shadow: 1px 1px 1px #fff;
-ms-text-shadow: 1px 1px 1px #fff;
-o-text-shadow: 1px 1px 1px #fff;
-webkit-text-shadow: 1px 1px 1px #fff;
text-shadow: 1px 1px 1px #fff;
}
ul.nav-main li:hover a {
color: #000 !important;
float: left;
font: 700 14px/14px 'Open Sans Condensed', sans-serif;
padding: 18px;
-moz-text-shadow: 1px 1px 1px #fff !important;
-ms-text-shadow: 1px 1px 1px #fff !important;
-o-text-shadow: 1px 1px 1px #fff !important;
-webkit-text-shadow: 1px 1px 1px #fff !important;
text-shadow: 1px 1px 1px #fff !important;
}
ul.nav-main li ul {
display: none;
}
ul.nav-main li:hover ul {
background: #ddd url(images/striped-bg.png);
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
-moz-box-shadow: 0 3px 7px -2px #333;
-ms-box-shadow: 0 3px 7px -2px #333;
-o-box-shadow: 0 3px 7px -2px #333;
-webkit-box-shadow: 0 3px 7px -2px #333;
box-shadow: 0 3px 7px -2px #333;
display: block;
padding: 5px;
position: absolute;
left: 0px;
top: 50px;
width: 150px;
}
ul.nav-main li:hover ul li {
background: #eee;
position: relative;
}
ul.nav-main li:hover ul li a {
float: left;
padding: 8px;
width: 134px;
}
ul.nav-main li:hover ul li:hover,
ul.nav-main li:hover ul li:hover.current-menu-item {
background: #fff !important;
}
ul.nav-main li:hover ul li ul {
display: none;
}
ul.nav-main li:hover ul li:hover ul {
display: block;
margin: 0;
position: absolute;
left: 150px;
top: -5px;
width: 150px;
}
#nav-mobi {
display: none;
overflow: hidden;
}
#nav-mobi select {
border: 1px solid #2d2f31;
border-radius: 3px;
color: #fff;
float: left;
margin: 10px;
padding: 0 30px 0 5px;
width: 300px;
height: 30px;
-webkit-appearance: none !important;
}
#nav-search {
float: right;
padding-top: 9px;
position: relative;
text-align: right;
width: 150px;
}
#searchform {
float: left;
position: relative;
}
#searchform input {
background: url(images/search-icon.png) no-repeat right;
border: 0;
border-bottom: 1px solid #666;
border-radius: 2px;
-moz-box-shadow: 0 2px 10px -2px #000 inset;
-ms-box-shadow: 0 2px 10px -2px #000 inset;
-o-box-shadow: 0 2px 10px -2px #000 inset;
-webkit-box-shadow: 0 2px 10px -2px #000 inset;
box-shadow: 0 2px 10px -2px #000 inset;
color: #aaa;
float: left;
font: 12px/12px helvetica, arial, sans-serif;
margin: 0 0 10px;
padding: 9px 0 9px 10px;
width: 140px;
height: 12px;
}
#searchform #search-button {
border: none;
float: left;
}
#searchform #s:focus {
outline: none;
}
you are using fixed position on you nav which means that it is at the very top no matter what. I think what's confusing you is that when you see the website it looks all messed up but when a non admin sees it it is fine. If you have a lot of users that will see the admin bar then you will need to use some wp logic to see if the user is logged in as an admin and if so that "top" attribute will need to be like 75px or however tall the admin bar is. Also if you want a quick dirty fix there is a plugin that hides the admin bar.

How to Change Selected tab color using ajax in asp.net?

I used a Master Page and on separate page, I used ajax tab control but unable to change selected tab color..
Thanx in Advance
You can use this css.
.MyTabStyle .ajax__tab_header
{
font-family: "Helvetica Neue" , Arial, Sans-Serif;
font-size: 14px;
font-weight: bold;
display: block;
margin-left:20px;
z-index:-1000;
}
.MyTabStyle .ajax__tab_header .ajax__tab_outer
{
border-color: #222;
color: #222;
padding-left: 10px; /*margin-right: 3px;*/
border: solid 1px #999;
border-bottom-color: #d7d7d7;
-webkit-margin-before: 1em;
-webkit-margin-after: -1px;
-webkit-margin-start: 0px;
-webkit-margin-end: -1px;
}
.MyTabStyle .ajax__tab_header .ajax__tab_inner
{
border-color: #666;
color: #000;
padding: 0px 5px 0px 5px;
}
.MyTabStyle .ajax__tab_hover .ajax__tab_outer
{
border-color: #BBB; /*color #1*/
background: white;
color: Black;
}
.MyTabStyle .ajax__tab_hover .ajax__tab_inner
{
color: Black;
cursor: pointer;
}
.MyTabStyle .ajax__tab_outer
{
padding: 0 16px; /* edit 16px for different tab width */
display: inline-block;
font: normal 12px Verdana;
line-height: 25px; /* height #1 */
text-decoration: none;
color: #333;
border: 1px solid #999; /*This color can be different from color #2 */
border-bottom: none;
background: #F6F6F9;
outline: none;
border-radius: 5px 5px 0 0;
position: relative;
margin: 0 -1px -1px 0;
text-align: -webkit-match-parent;
}
.MyTabStyle .ajax__tab_active .ajax__tab_outer
{
color: white;
font-weight: bold;
border-color: #BBB; /*color #1*/
background: #0099CC; /*color #2*/
/*z-index: 3;*/
padding: 1px 10px 0px 10px;
border-bottom-width: 0px;
}
.MyTabStyle .ajax__tab_active .ajax__tab_inner
{
color: white;
border-color: #333;
padding: 0px 10px 0px 10px;
}
.MyTabStyle .ajax__tab_body
{
font-family: verdana,tahoma,helvetica;
font-size: 10pt;
/*background-color: #fff;*/ /*border-top-width: 0;*/
border: solid 1px #d7d7d7; /*border-top-color: #ffffff;*/
padding: 10px 10px;
border-radius: 4px;
box-shadow: 0 0 8px #CCC;
background-color: white;
}
HTML
<asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Width="100%"
CssClass="MyTabStyle" OnClientActiveTabChanged="SaveActiveTabIndex">
<asp:TabPanel HeaderText="Personal Details" runat="server" ID="TabPanel1">
<ContentTemplate>
</ContentTemplate>
</asp:TabPanel>
</asp:TabContainer>
I know it's an old question, but if anyone will need this, a working answer is:
.MyTabStyle .ajax__tab_tab /*inactive tab*/
{
outline: 0;
}
.MyTabStyle .ajax__tab_active .ajax__tab_tab /*active tab*/
{
color: #d13f31;
outline: 0;
}

css padding the placeholder text inside the text field

I am trying to pad the bottom area for the placeholder text, because it is too close to the line. but i am not sure what property is going to work. Here is my css. And also, another problem is that when I open it on firefox, the magnifying icon is about 1 pixel higher than the line. It looks fine on chrome. Does anybody know?
Thanks.
.search_input{
font-family: Helvetica;
font-size:14px;
border:1px solid #000000;
border-top:1px;
border-right: -0px;
border-left: 0px;
margin-left: 3px;
margin-right: -23px;
margin-top: 6px;
width: 150px;
box-sizing: border-box;
}
#tfnewsearch input:focus {
outline: 0;
background: #fff;
-moz-box-shadow: 0 0 2px rgba(0,0,0,.8) inset;
-webkit-box-shadow: 0 0 2px rgba(0,0,0,.8) inset;
box-shadow: 0 0 2px rgba(0,0,0,.8) inset;
}
#tfnewsearch input::-webkit-input-placeholder {
color: #999;
font-size: 17px;
padding-bottom:3px;
height: 19px;
}
#tfnewsearch input:-moz-placeholder {
color: #999;
font-size: 17px;
padding-bottom:3px;
}
#tfnewsearch input:-ms-input-placeholder {
color: #999;
font-size: 17px;
padding-bottom:3px;
}
.t_button {
outline: none; cursor: pointer;margin-bottom: -5px; margin-left: 22px;margin-right: 1px; border: solid 1px #000000; border-top:0px; border-left: 1px; border-right: 1px;
}
<form id="tfnewsearch" method="get" action="index.php">
<input type="text" class="search_input" name="q" size="17" maxlength="120" placeholder="Search" required><img src="imgs/icon_search.gif" value="search" class="t_button">
</form>
try to use padding to .search_input
.search_input{
font-family: Helvetica;
font-size:14px;
border:1px solid #000000;
border-top:1px;
border-right: -0px;
border-left: 0px;
margin-left: 3px;
margin-right: -23px;
margin-top: 6px;
width: 150px;
box-sizing: border-box;
padding-bottom:5px;
}
http://jsfiddle.net/yZXSJ/

How do I apply Devexpress themes to a basic html table?

I'm using Devexpress's MVC exctensions within my MVC3 w/razor project. I have data grids using Devexpress's MVC extensions and also basic html tables without any styling.
Is there a way to apply the devexpress styles to my html tables for a consistent look?
You can use css to style a grid then follow the same principle for a table. Here is a style for a grid I created then styles for a similar looking table
/************************GRID STYLE************************************/
.mGrid
{
width: 100%;
background-color: #fff;
margin: 5px 0 5px 0;
border: solid 1px #525252;
border-collapse: collapse;
font-size: 13px; /*width: 820px;*/
text-align: center;
}
.mGrid td
{
padding: 2px;
border: solid 1px #c1c1c1;
color: #717171;
height: 20px;
}
.mGrid th
{
padding: 4px 2px;
color: #fff;
background: #424242 url(images/grd_head.png) repeat-x top;
border-left: solid 1px #525252;
height: 20px; /*font-size: 15px; */
}
.mGrid .alt
{
background: #fcfcfc url(images/grd_alt.png) repeat-x top;
}
.mGrid .pgr
{
background: #424242 url(images/grd_pgr.png) repeat-x top;
text-align: left;
}
.mGrid .pgr table
{
margin: 5px 0;
}
.mGrid .pgr td
{
border-width: 0;
padding: 0 6px;
border-left: solid 1px #666;
font-weight: bold;
color: #fff;
line-height: 12px;
}
.mGrid .pgr a
{
color: #666;
text-decoration: none;
font-size: 13px;
}
.mGrid .pgr a:hover
{
color: #AED434;
text-decoration: none;
font-size: 13px;
}
/************************END GRID STYLE************************************/
/************************mGrid Table Look alike STYLE************************************/
.mGridLookAlikeTable
{
width: 100%;
background-color: #fff;
margin: 5px 0 5px 0;
border: solid 1px #525252;
border-collapse: collapse;
font-size: 13px;
/*width: 820px;*/
text-align: center;
}
.mGridLookAlikeTable td
{
padding: 2px;
border: solid 1px #c1c1c1;
color: #717171;
height: 20px;
}
.mGridLookAlikeTable th
{
padding: 4px 2px;
color: #fff;
background: #424242 url(images/grd_head.png) repeat-x top;
border-left: solid 1px #525252;
height: 20px; /*font-size: 15px; */
}
/************************END mGrid Table Look alike STYLE************************************/

CSS table naming

Is there any way I can rename this CSS code to only affect a certain table instead of all the tables on my site?
th {
font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
letter-spacing: 2px;
text-transform: uppercase;
text-align: left;
padding: 6px 6px 6px 12px;
}
th.nobg {
border-top: 0;
border-left: 0;
background: #C1DAD7;
}
td {
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
background: #fff;
padding: 6px 6px 6px 12px;
color: #4f6b72;
}
td.alt {
background: #F5FAFA;
color: #797268;
}
th.spec {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #fff;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}
th.specalt {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #f5fafa;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #797268;
}
and the HTML code:
<table id="mytable" cellspacing="0">
<tr>
<th width="202" class="nobg" scope="col">Configurations</th>
<th width="250"></th>
</tr>
<tr>
<th scope="row" class="spec">Model</th>
<td>M9454LL/A</td>
</tr>
<tr>
<th scope="row" class="specalt">G5 Processor</th>
<td class="alt">Dual 1.8GHz PowerPC G5</td>
</tr>
<tr>
<th scope="row" class="spec">Frontside bus</th>
<td>900MHz per processor</td>
</tr>
<tr>
<th scope="row" class="specalt">Level2 Cache</th>
<td class="alt">512K per processor</td>
</tr>
</table>
You can change your CSS selectors to match only a specific table ID, so for instance...
#mytable th {
font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
letter-spacing: 2px;
text-transform: uppercase;
text-align: left;
padding: 6px 6px 6px 12px;
}
#mytable th.nobg {
border-top: 0;
border-left: 0;
background: #C1DAD7;
}
#mytable td {
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
background: #fff;
padding: 6px 6px 6px 12px;
color: #4f6b72;
}
To specifically target the table that you showed the html code for, do this:
#mytable th {
font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
letter-spacing: 2px;
text-transform: uppercase;
text-align: left;
padding: 6px 6px 6px 12px;
}
#mytable th.nobg {
border-top: 0;
border-left: 0;
background: #C1DAD7;
}
#mytable td {
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
background: #fff;
padding: 6px 6px 6px 12px;
color: #4f6b72;
}
#mytable td.alt {
background: #F5FAFA;
color: #797268;
}
#mytable th.spec {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #fff;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}
#mytable th.specalt {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #f5fafa;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #797268;
}
You wouldn't need the full table#mytable.
Put table#mytable in front of every css selector.
table#mytable th{
}
table#mytable th.nobg{
}
table#mytable td{
}
table#mytable td.alt{
}
table#mytable th.spec{
}
table#mytable th.specalt{
}
Or just #mytable.
#mytable th{
}
#mytable th.nobg{
}
#mytable td{
}
#mytable td.alt{
}
#mytable th.spec{
}
#mytable th.specalt{
}
You can prefix every rule with your table id (#mytable) so you'll have something like
#mytable th {
font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
letter-spacing: 2px;
text-transform: uppercase;
text-align: left;
padding: 6px 6px 6px 12px;
}
#mytable th.nobg {
border-top: 0;
border-left: 0;
background: #C1DAD7;
}
#mytable td {
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
background: #fff;
padding: 6px 6px 6px 12px;
color: #4f6b72;
}
#mytable td.alt {
background: #F5FAFA;
color: #797268;
}
#mytable th.spec {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #fff;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}
#mytable th.specalt {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #f5fafa;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #797268;
}

Resources