Solved

How to ignore .css and other styles on a table

Posted on 2013-01-24
3
451 Views
Last Modified: 2013-01-24
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
Comment
Question by:earwig75
3 Comments
 
LVL 30

Expert Comment

by:LZ1
ID: 38815284
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
 
LVL 36

Accepted Solution

by:
SidFishes earned 500 total points
ID: 38815364
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
 

Author Comment

by:earwig75
ID: 38815468
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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question