Usamos cookies para medir audiência e melhorar sua experiência. Você pode aceitar ou recusar a qualquer momento. Veja sobre o iMasters.
quando eu defino um css para uma table e dentro dessa table eu tenho outra table. A table secundaria ira herdar o class da table primaria. ou eu consigo definir um class para a table secundario. alguem saberia me dizer como.Grata,simone lopes
o meu nao esta dando certo, vou te passar o codigo:a class="tableHV" é da primeira tabelaa class="transparent" é da segunda tabela que esta dentro da primeira tabela e esta herdando as propriedades da primeira tabela.Saberia me dizer porque, como especificar no CSS.<table width="630" border="0" cellspacing="0" cellpadding="0" class="tableHV> <tr class="tableRowOdd"> <td width="5%"> <input type="radio" name="radiobutton" value="radiobutton"> </td> <td width="18%" align="center">SLA 001/04</td> <td width="20%" align="center">CyDC</td> <td width="22%" align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0" class="transparent"> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> ARISCO</td> <td width="19%" align="center">19/11/2004</td> <td width="16%" align="center">18/11/2005</td> </tr> </table>
como esta o seu CSS?
vou te enviar:/ ################################################################################################# Tabelas############################################################################################/.innerTable td{ border: none;}.tableLabel { FONT-SIZE: 10pt;}.tableHV TD, .tableH TD, .tableV TD, .tableClean TD, .tableHV TH, .tableH TH, .tableV TH, .tableClean TH { FONT-SIZE: 8pt;}/ ################################################################################################# Treeview############################################################################################/.linkTreeview, .linkTreeviewSelected, .linkTreeviewActive { FONT-SIZE: 9pt;}.textTreeview, .textTreeviewDisabled { FONT-SIZE: 9pt;}SPAN.TreeviewSpanArea A { font-size: 10pt; }/ ################################################################################################# Redefinição de Tags básicas do HTML############################################################################################/ BODY { FONT-FAMILY: verdana; FONT-WEIGHT: normal; background-color: #FFFFFF; margin: 0px; padding: 0px;}/ ################################################################################################# Corpo da página############################################################################################/ .textPageTitle { FONT-WEIGHT: bold; COLOR: #3366CC; TEXT-DECORATION: none;}.textStep { font-weight: normal; color: #86B8F0;}.textStepActive { font-weight: normal; color: #FFAE31;}.textLabel, .textLabelRequired, .textLabelError { COLOR: #000000; TEXT-DECORATION: none; TEXT-ALIGN: right;}.textLabelRequired { font-weight: none;}.textLabelError { font-weight: bold;}.textLabelError { COLOR: #FF0000;}.textDefault, .textDefaultBold { COLOR: #000000; TEXT-DECORATION: none; TEXT-ALIGN: left;}.textDefaultBold { FONT-WEIGHT: bold;}.textInstructional { COLOR: #3366CC; TEXT-DECORATION: none;}.textReadOnly { COLOR: #1E4C7B; TEXT-DECORATION: none; TEXT-ALIGN: left;}.textCellBdrReadOnly { COLOR: #1e4c7b; BORDER: 1px solid #336699;}.textError { COLOR: #FF0000; TEXT-DECORATION: none;}.textRequiredField { FONT-WEIGHT: bold; COLOR: #FF0000; TEXT-DECORATION: none;}.textMsgTitle { FONT-WEIGHT: bold; COLOR: #1E4C7B; TEXT-DECORATION: none;}.textCellBdr { COLOR: #000000; BORDER: 1px solid #336699;}.textTabNotSelectedMid { FONT-WEIGHT: bold; COLOR: #FFFFFF; BACKGROUND-COLOR: #336699; TEXT-DECORATION: none; BORDER-TOP: 1px solid #336699; BORDER-RIGHT: 1px solid #FFFFFF; BORDER-LEFT: 1px solid #FFFFFF; BORDER-BOTTOM: 1px solid #336699; }.textTabNotSelectedL { FONT-WEIGHT: bold; COLOR: #FFFFFF; BACKGROUND-COLOR: #336699; TEXT-DECORATION: none; BORDER-TOP: 1px solid #336699; BORDER-RIGHT: 1px solid #FFFFFF; BORDER-LEFT: 0px solid #FFFFFF; BORDER-BOTTOM: 1px solid #336699; }.textTabNotSelectedR { FONT-WEIGHT: bold; COLOR: #FFFFFF; BACKGROUND-COLOR: #336699; TEXT-DECORATION: none; BORDER-TOP: 1px solid #336699; BORDER-RIGHT: 0px solid #FFFFFF; BORDER-LEFT: 1px solid #FFFFFF; BORDER-BOTTOM: 1px solid #336699; } .textTabSelected { FONT-WEIGHT: bold; COLOR: #336699; TEXT-DECORATION: none; BORDER-TOP: 0px solid #FFFFFF; BORDER-RIGHT: 1px solid #FFFFFF; BORDER-LEFT: 1px solid #FFFFFF; BORDER-BOTTOM: 0px solid #FFFFFF; }.textTableHeaderBdr { FONT-WEIGHT: bold; COLOR: #FFFFFF; BACKGROUND-COLOR: #336699; TEXT-DECORATION: none; BORDER-TOP: 0px solid #336699; BORDER-RIGHT: 1px solid #e5e5e5; BORDER-LEFT: 1px solid #e5e5e5; BORDER-BOTTOM: 1px solid #e5e5e5; }.textTableHeaderBdrInv { FONT-WEIGHT: bold; COLOR: #336699; BACKGROUND-COLOR: #FFFFFF; TEXT-DECORATION: none; BORDER-TOP: 1px solid #336699; BORDER-RIGHT: 1px solid #e5e5e5; BORDER-LEFT: 1px solid #e5e5e5; BORDER-BOTTOM: 1px solid #e5e5e5; }.textFrame { FONT-WEIGHT: bold; COLOR: #FFFFFF; TEXT-DECORATION: none;}.layerBdr { position: relative; margin: 0pt 0pt; padding: 6pt; width: 100%; top: 0px; left: 0px; overflow: auto; border-width: 1px; border-style: inset;}.textTableHeader { FONT-WEIGHT: bold; COLOR: #FFFFFF; BACKGROUND-COLOR: #336699; TEXT-DECORATION: none;}.textMath { COLOR: #000000; TEXT-DECORATION: none;}.textDateInput, .textNumberInput, .textInput, .textInputReadOnly, .textInput5Character, .textInputMore5Character, .textDateHourInput, .textHourInput, .textPeriodInput { FONT-FAMILY: verdana; margin-top: 1px; margin-right: 1px; margin-bottom: 1px; margin-left: 1px; background-color: #E5E5E5; border: #000066; color: #000000; border-top-color : #000066; border-left-color : #000066; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-style:solid; /background-color: #E6EDF7; COLOR: #000000; text-transform: uppercase;/}.textInputDisabled { COLOR: #777777; / background-color: #DDDDDD;/}.textInputReadOnly { background-color: transparent; border: none;}.toolTip { color: #000000; background-color: #FFC864; padding: 1px; border: 1px solid #000000;}.spanList { overflow: auto; position: static; z-index: 1; border-style : inset; border-width : 2px; border-top-color : #999999; border-left-color : #999999; background : #e6edf7;}.textList, .textListDisabled, .textListSelected{ padding-left: 3pt; color: #000000; text-decoration: none; text-align: left; text-transform: uppercase; background : #e6edf7; cursor: default;}.parenthesisLevel1, .parenthesisLevel2, .parenthesisLevel3, .parenthesisLevel4 { font-weight: bold;}.parenthesisLevel1 { color: #86B8F0;}.parenthesisLevel2{ color: #FFAE31;}.parenthesisLevel3{ color: #A49787;}.parenthesisLevel4{ color: #3366CC;}/################################################################################################# Menu Lateral############################################################################################/.menu, .menuMouseOver, .menuMouseDown { COLOR: #FFFFFF; font-family: verdana; font-size: 10pt; font-weight: normal; text-decoration:none; background-color: #1E4C7B; padding-left:5pt; cursor:default;}.menuMouseOver { color: #000000; background-color: #FFAE31;}.menuMouseDown { color: #1E4C7B; background-color: #A5AEC6;}/ ################################################################################################# Tabelas############################################################################################/ .spanTable, .spanContent { /scrollbar-DarkShadow-Color:#004080; scrollbar-3dLight-Color:#0086BF; scrollbar-Arrow-Color:#FFFFFF; scrollbar-Base-Color:#0077A9; scrollbar-Face-Color:#336699; scrollbar-Highlight-Color:#FFFFFF; scrollbar-Shadow-Color:#0077A9; scrollbar-Track-Color:#6F9ECE; border-right: 2px solid #336699; border-bottom: 1px solid #336699; / overflow: auto; position: static; z-index: 1;}.tableLabel { FONT-WEIGHT: bold; COLOR: #3366CC; TEXT-DECORATION: none; border-bottom: 1px solid #336699;}.tableHV, .tableH, .tableV, .tableClean { COLOR: #000000; background-color: #FFFFFF; text-align: left; border-top: 1px solid #336699; border-left: 1px solid #336699; vertical-align: baseline;}.tableH, .tableClean { border-right: 1px solid #336699;}.tableV, .tableClean { border-bottom: 1px solid #336699;}.tableHV tr, .tableH tr, .tableV tr, .tableClean tr { height: 20px;}.tableHV th, .tableH th, .tableV th, .tableClean th { FONT-WEIGHT: bold; COLOR: #FFFFFF; TEXT-DECORATION: none; white-space: nowrap; background-color: #336699;}.tableHV th, .tableH th, .tableV th, .tableClean, .tableHV td, .tableH td, .tableV td, .tableClean td { padding-left: 0pt; padding-right: 0pt;}.tableHV th, .tableH th { border-bottom: 1px solid #FFFFFF;}.tableHV th, .tableV th { border-right: 1px solid #FFFFFF;}.tableHV td { border-right: 1px solid #336699; border-bottom: 1px solid #336699;}.tableH td { border-bottom: 1px solid #336699;}.tableV td { border-right: 1px solid #336699;}.tableDataString, .tableDataStringReadOnly{ text-align: left;}.tableDataCurrency, .tableDataCurrencyReadOnly { text-align: right;}.tableDataNumber, .tableDataNumberReadOnly { text-align: right;}.tableDataDate, .tableDataDateReadOnly { text-align: center;}.tableDataTime, .tableDataTimeReadOnly { text-align: center;}.tableDataDateTime, .tableDataDateTimeReadOnly { text-align: left;}.tableDataOption, .tableDataOptionReadOnly { text-align: center;}.tableDataInnerTable { padding: 10px;}.tableDataStringReadOnly, .tableDataCurrencyReadOnly, .tableDataNumberReadOnly, .tableDataDateReadOnly, .tableDataTimeReadOnly, .tableDataDateTimeReadOnly, .tableDataOptionReadOnly { COLOR: #1e4c7b;}.tableRowOdd { / Linhas mpares / background-color: #FFFFFF;}.tableRowEven { / Linhas pares / background-color: #E6EDF7;}.tableRowOddSelected, .tableRowEvenSelected, #tableColSelected { background-color: #FFE8C5;}.tableDataIdent1, .tableDataIdent2 { padding-top: 0px; padding-right: 5px; padding-bottom: 15px;}.tableDataIdent1 { padding-left: 21px;}.tableDataIdent2 { padding-left: 41px;}/ ################################################################################################# Treeview############################################################################################/.linkTreeview { FONT-WEIGHT: bold; COLOR: #1E4C7B; TEXT-DECORATION: none;}.linkTreeview:hover { COLOR: #FFAE31; }.linkTreeview:active { COLOR: #FFAE31; }.linkTreeviewSelected { FONT-WEIGHT: bold; COLOR:#3366CC; TEXT-DECORATION: none; TEXT-TRANSFORM: uppercase;}.linkTreeviewActive { FONT-WEIGHT: bold; COLOR:#FFAE31; TEXT-DECORATION: none;}.textTreeview { FONT-WEIGHT: bold; COLOR: #1E4C7B; TEXT-DECORATION: none;}.textCurrentTreeview { FONT-WEIGHT: bold; COLOR: #FFAE31; TEXT-DECORATION: none;}SPAN.TreeviewSpanArea{ /scrollbar-DarkShadow-Color=#004080; scrollbar-3dLight-Color=#0086BF; scrollbar-Arrow-Color=#FFFFFF; scrollbar-Base-Color=#0077A9; scrollbar-Face-Color=#336699; scrollbar-Highlight-Color=#FFFFFF; scrollbar-Shadow-Color=#0077A9; scrollbar-Track-Color=#6F9ECE; / overflow: auto; position: static; z-index: 1;}SPAN.TreeviewSpanArea A { text-decoration: none; color: #1E4C7B;}SPAN.TreeviewSpanArea A:hover { color:#FFAE31; font-weight: bold;}.tableimage { background-image: url(../fundotabbranc1.gif);}.tableimagecantdirbord { background-image: url(../cantsuperiordirbor1.gif);}.tableimagecantesq { background-image: url(../cantsuperioresq1.gif)}.tableimagecantdir { background-image: url(../cantsuperiordir1.gif)}.textbluewrite { font-family: verdana; font-size: 12px; text-align: left; FONT-WEIGHT: bold; COLOR: #FFFFFF; BACKGROUND-COLOR: #336699; TEXT-DECORATION: none; BORDER-TOP: 1px solid #336699; /BORDER-RIGHT: 1px solid #FFFFFF; BORDER-LEFT: 0px solid #FFFFFF;/ BORDER-BOTTOM: 1px solid #336699;}.tableimagecantesqbord { background-image: url(../cantsuperioresqbord1.gif)}.textarea { }.tableclean1 { COLOR: #000000; FONT-SIZE: 8pt; text-align: left; border-top: 0px solid #336699; border-left: 0px solid #336699; border-right: 0px solid #336699; border-bottom: 0px solid #336699; vertical-align: baseline; height: 20px;}
Que baguncinha que você fez hein...
Tava com preguiça e nem procurei direito, mas não achei essa class 'transparent' que você disse...
mas se você quiser uma dica pra organizar o seu código, não faz isso que você fez não, tipo, tenta agrupar melhor as classes com mesmo nome.
eu digo assim: ao invés de declarar um estilo pra um elemento da classe no início do código outro no meio e outro no fim, espalhado, coloca os parecidos mais juntos, tipo assim:
.tableHV td, .tabelHV tr, .tableHV th {/ estilos /}
.tableHV a {/ estilos /}
.tableHV a:hover {/ estilos /}
e aí depois você declara outra classe que vai aparecer dentro desse elemento:
.transparent td, .transparent tr {/ estilos /}
ou então junta as duas:
.tableHV.transparent td, .tabelHV.transparent tr, .tableHV.transparent th, {/ estilos /}
sei lá...
eu costumo fazer assim, se eu sei q vai ter uma table dentro de outra eu faço:
.nome_da_classe table {/ estilos da table de fora /}
.nome_da_classe table table {/ estilos da table de dentro /}
esquisito mas funciona (...) http://forum.imasters.com.br/public/style_emoticons/default/joia.gif
vou tentar fazer isso mesmo.Obrigado pela dica.
Mas olha so, eu fiz assim, e a tabela secundaria continua herdando os estilos da tabela primaria. TEm algum lugar que pode estar declarando isso? você saberia me dizer?
olha Simone...testei o seu código e ele n faz nada... tipow, mostra um radio-button algumas datas e palavras e nada de tabela...nenhuma borda nem nem cor...você n tem nenhuma classe chamada "transparent"...quer um conselho? tenta refazer o css...mas tenta não misturar muito o código, pq eu tava dando uma olha e tá uma salada, n dá pra entender nada...sem ofensas, mas realmente fica até difícil de encontrar alguma coisa nesse código
você pode criar duas classes, umas para a primaria e outra para a secundaria sem problemas