Solved

How to ignore .css and other styles on a table

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

708 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now