• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 458
  • Last Modified:

How to ignore .css and other styles on a table

I have a table on a page and I would like that table to ignore all other styles specified on the page or linked to with a .css file. could someone assist?

I don't want to set any styles on this table at all by default because I am going to use coldfusion to alternate row colors on this table's tds and trs.

Thanks.
0
earwig75
Asked:
earwig75
1 Solution
 
LZ1Commented:
You could do a "mini" reset in my opinion. But you'd have to still give it a class or id.

table.blank-table,
table.blank-table tr td{border:/*whatever you want*/;margin:0;padding:0;}

Open in new window


Basically you'll just reset all styles to 0 or blank in that class/id
0
 
SidFishesCommented:
You can just set the style of the row at output...

<cfset TempQry= querynew("")>
 <cfset queryaddcolumn  (TempQry, "Col1", "CF_SQL_integer", ListToArray("1,2,3,4,5,6"))>
<cfset queryaddcolumn  (TempQry, "Col2", "cf_sql_varchar", ListToArray("here, there, everywhere, nowhere, anywhere,somewhere"))> 
 

<style>
#test {font-size:2em;font-weight:bold;}
</style>
<cfoutput>
<div id="test">this is styled
<table>
	<cfloop query="TempQry">
<tr>
<td style="font-size:12px;padding:5px;border-bottom:1px dashed;<cfif currentrow mod 2>background-color:##FFFFCC;</cfif>">#col2#</td>
</tr>
	</cfloop>
</table>
</div></cfoutput>

Open in new window

0
 
earwig75Author Commented:
SidFishes...

You can just set the style of the row at output...

I am outputting my query like this.... can I still use that method? If so can you show me a small sample?
      <table>
<tr>
      <th>type</th>
      <th>make</th>
      <th>model</th>
</tr>
<cfoutput query="allCars">      
      <tr>
      <td>#type#</td>
      <td>#make#</td>
      <td>#model#</td>
</tr>
</cfoutput>
      </table>
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now