Solved

How to ignore .css and other styles on a table

Posted on 2013-01-24
3
453 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

726 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