Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redefine Tags

Status
Not open for further replies.

EMax1

MIS
Apr 8, 2004
95
US
When I redefine a tag (table) to have a blue border, is-it possible to have on the same page a table with a blue border and one that do not have a blue border. I changed the color but this doesn't do anything.
I will appreciate a hint on this.
Thanks
 
You can create a separate class for the second table. But it is a good thing to use classes instead of rewriting the behaviour of a common element if you do not want to have all elements behave in that manner. So I would suggest classes for both tables. But here's the class example for one:
Code:
<style type="text/css">
 table {
  border: 1px solid blue;
 }

 .redTable {
  border: 1px solid red;
 }
</style>

<table>
 <tr>
  <td>I have a blue border.</td>
 </tr>
</table>

<table class="redTable">
 <tr>
  <td>I have a red border.</td>
 </tr>
</table>
Hope it helps.
 

To remove the border on the other table, add a style directive to it:

Code:
<table style="border:none;">

Hope this helps,
Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top