473,394 Members | 1,811 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

tr.even, tr.odd

Hi,

I have a table in my page, I want to give alternate effects to each row,
so i have added tr.odd and tr.even in the styles sheet,

Expand|Select|Wrap|Line Numbers
  1. tr.odd {
  2.     margin-left: 5px;
  3.     padding-left: 5px;
  4.     padding-right: 5px;
  5.     font-family: Arial, Helvetica, sans-serif;
  6.     font-size: 10px;
  7.     color: #000;
  8.     text-align:center;
  9.     background-color: #FEE8C7;
  10.     height: 20px;
  11.     padding-top: 3px;
  12.      cursor:pointer;
  13. }
  14.  
  15. tr.even {
  16.     margin-left: 5px;
  17.     padding-left: 5px;
  18.     padding-right: 5px;
  19.     font-family: Arial, Helvetica, sans-serif;
  20.     font-size: 10px;
  21.     color: #000;
  22.     text-align: center;
  23.     background-color: #ffffff;
  24.     height: 20px;
  25.     padding-top: 3px;
  26.     cursor:pointer;
  27. }

Now styles are applied in Firefox, but its not applied in IE6

Can some please help me out.

Thanks in Advance
Dec 21 '09 #1
1 10056
acoder
16,027 Expert Mod 8TB
You can set the styles which are the same for the element and the different style in the class:
Expand|Select|Wrap|Line Numbers
  1. tr {
  2.     margin-left: 5px;
  3.     padding-left: 5px;
  4.     padding-right: 5px;
  5.     font-family: Arial, Helvetica, sans-serif;
  6.     font-size: 10px;
  7.     color: #000;
  8.     text-align:center;
  9.     background-color: #FEE8C7;
  10.     height: 20px;
  11.     padding-top: 3px;
  12.     cursor:pointer;
  13. }
  14.  
  15. tr.even {
  16.     background-color: #FFFFFF;
  17. }
Show your HTML code. What doesn't work in IE6?

PS. please make sure you use [code] tags when posting code.
Dec 22 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: bill drescher | last post by:
I have a long table and I want to have the alternating rows slightly different colors for clarity. Is there any way to avoid using a class designation in each tr ? (yes, it is for tabular data...
0
by: Nathan | last post by:
Hi, I seem to having a peculiar problem with the display of odd and even pages in XSL-FO. Here is a small background of the problem. My xsl stylesheet mentions my fo:layout-master-set as ...
34
by: Frederick Gotham | last post by:
I'm trying to write extremely efficient, fully portable algorithms to determine if an integer is odd or even. The most basic algorithms would be: #define IS_ODD(x) ((x) % 2) #define IS_EVEN(x)...
10
by: Doug Robertson | last post by:
First off, I'm a hardware/OS guy. I just write code on the side and I'm completely self taught - so bear in mind my total lack of expertise. I have a program originally written in VB2003 using...
17
by: Ron | last post by:
I want to write a program that will accept a number in a textbox for example 23578 and then in a label will display the sum of the odd and even number like this... the textbox containsthe number...
6
by: Klaas Vantournhout | last post by:
Hi, I have a question, which is just out of interest. What is the fastest way to do an odd/even check with c++ and if needed assembler. Assume n is an unsigned integer like type (unsigned...
1
by: chiefychf | last post by:
I'm working on a school project and I am having a few issues... The program calls for three arrays a,b,c that have to be sorted, then compared to even or odd and stored in arrays d & e, then merge...
30
by: bdsatish | last post by:
The built-in function round( ) will always "round up", that is 1.5 is rounded to 2.0 and 2.5 is rounded to 3.0. If I want to round to the nearest even, that is my_round(1.5) = 2 # As...
18
by: =?ISO-8859-1?Q?Ney_Andr=E9_de_Mello_Zunino?= | last post by:
Hello. It seems a year is all it takes for one's proficiency in C++ to become too rusty. Professionally, I've been away from the language (and from programming in general), but I still preserve...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.