?
Solved

How to ignore .css and other styles on a table

Posted on 2013-01-24
3
Medium Priority
?
455 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

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.
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

764 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