IBM developerWorks
           CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 16th, 2001, 08:00 AM
mortyrium mortyrium is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Berlin
Posts: 2 mortyrium User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how to make different css classes in the same table

Who can help me?

Per example: I want to make some different classes in one html-screen.

here parts of the css contents:

.gruen{font-family:helvetica,arial; font-size:13px; font-weight: bold; background-color:#b8bd9b;}
.gruen1{font-family:helvetica,arial; font-size:13px; font-weight: bold; background-color:#d8dacf;}

classes "gruen" and "gruen1"

and I want them to make a nice table in the table rows, <tr>
<TR VALIGN="bottom" class="gruen">
<TR VALIGN="bottom" class="gruen1">

So it has to become every second of the <tr>`s with the backgroundcolors from the style sheets.

first <TR VALIGN="bottom" class="gruen">
second <TR VALIGN="bottom" class="gruen1">
third <TR VALIGN="bottom" class="gruen">
fourth <TR VALIGN="bottom" class="gruen1">

and so on...

And I don`t want to do it in a long brutal manual way... because there are Hundred of html-files with the table...

What can I do?

thanks in hope of answers
for questions I`m german from Berlin

Reply With Quote
  #2  
Old July 16th, 2001, 09:22 AM
pieux pieux is offline
Seņor Member
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2000
Posts: 1,156 pieux User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 17 m 59 sec
Reputation Power: 9
The only way you can accomplish what you want programmatically, is if you have the content of your table coming from a seperate source (e.g.: a database or array) than the actual HTML of the table itself. If this is the case, then as you perform the loop in your code (either server-side code or client-side code, depending on whether you are using a database or array, respectively) for populating the table from the database, simply check the state of a boolean variable before you write each row (tr) and set the class accordingly. After you write the row, change the state of the variable so that you will be writing the other class the next time through.
__________________
Michael

Reply With Quote
  #3  
Old July 16th, 2001, 11:10 AM
mortyrium mortyrium is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: Berlin
Posts: 2 mortyrium User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy

cruel world!

its not a dynamic style, its only static fiels to create...
the data are already in, when i want to change this types of colors in the rows!!


mfg

Reply With Quote
  #4  
Old July 16th, 2001, 12:33 PM
pieux pieux is offline
Seņor Member
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Aug 2000
Posts: 1,156 pieux User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 17 m 59 sec
Reputation Power: 9
Sorry -- I don't think there is any way for you to do that (short of writing a script in whatever OS you are using that does the typing for you, but by the time you get that finished, you might as well have typed it in by hand).

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > how to make different css classes in the same table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway