answersLogoWhite

0

You can do this by using the :nth-child() pseudo-class in CSS.

Your CSS would look something similar to this:

table { background-color:white;}

table tr:nth-child(2n+1) { background-color:grey;}

To see an example of this at work, check the related jsFiddle.

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What causes adjacent rows to have different formatting?

Initially all rows have the same formatting. As users enter data they can set different formatting for other cells, columns or rows. They can use Autoformatting, which is capable of picking up on regular data and formulas and apply different formatting to them. You can also use conditional formatting to change the format based on values in the cells or other conditions.


What formatting option positions text higher and smaller than adjacent text?

Superscript


What is the minimum resolvable line separation between adjacent lines?

The minimum resolvable line separation between adjacent lines is the smallest distance at which two lines can be distinguished from each other.


What happens when you switch on an incandescent bulb?

The surrounding area adjacent to the light bulb becomes easier to see.


What is a series of two or more adjacent cells in a column or rectangular group or cells?

A range is a series of two or more adjacent cells in a column or a rectangular group of cells in a spreadsheet. This range can be used for calculations, formatting, or referencing data in the cells.


What are the different types of piano notes and how are they distinguished from each other?

There are two main types of piano notes: white keys and black keys. White keys represent natural notes (A, B, C, D, E, F, G) and black keys represent sharp or flat notes. The black keys are distinguished by their position between the white keys and are named based on the adjacent white keys.


What is one way a parallelogram is different from a rhombus?

Adjacent sides of a parallelogram can be of different lengths.


What is different between a parallelogram and a square?

A parallelogram can have adjacent sides and angles which are different. A square cannot.


What is the definition of surrounding?

"Surrounding" refers to the area or environment that surrounds or encloses a particular object or place. It can also refer to the people, things, or conditions that are nearby or adjacent to a specific location.


Is a rhombuss a rectangle?

Is it not a parallelogram in which the adjacent sides are of different/unequal lengths ?


Which quadrilateral has two different pairs of adjacent congruent sides?

A kite or an arrowhead.


How do you find surrounding maps on a topographic map?

To find surrounding maps on a topographic map, look for grid lines or coordinates that provide references to adjacent maps. These grid indicators usually show which maps border the area you are currently viewing. You can use these references to locate and obtain the surrounding maps you need.