You might have seen websites that use html tables for displaying a long list of tabular information. While the information is nicely laid out it's sometimes difficult to read and follow especially when you have to scroll the page. To solve this problem, most designers will add alternating colors to the table rows using a technique called Zebra stripes.

Today, I'm going to show you how you can use Raxan PDI to add zebra stripes to your html tables

Let's say we have simple html page (my-web-page.html) with a table that looks like this:

FruitsSales (%) in Q3

Toggle Code

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Zebra Stripes</title>
    <link href="raxan/ui/css/master.css" rel="stylesheet" type="text/css" />
    <!--[if IE]><link rel="stylesheet" href="raxan/ui/css/"
    <link href="raxan/ui/css/default/theme.css" rel="stylesheet" type="text/css" />

    <div class="container c35">
        <table class="border c25">
            <thead><tr class="tbl-header"><th>Fruits</th><th>Sales (%) in Q3</th></tr></thead>


The first thing we need to do is to load our HTML page or view into the DOM. To do this, we will create a Rich Web page class called MyZebraStripes:



    class MyZebraStripes extends RaxanWebPage {
        protected function _init() {
            // load the html page


Next, we need to locate the even rows within the table. To do this, we will use the 'table tr:even' CSS selector:

    // find even table rows
    $rows = $this->find('table tr:even');

The above code will only select alternating <tr> elements within the table.

Finally, we need to add a CSS background color to the newly selected rows:

    $rows->css('background','#eee'); // add a background color

Here's what the entire code will look like:



    class MyPage extends RaxanWebPage {

        protected function _init() {
            // load the html page

        protected function _load() {
            $rows = $this->find('table tr:even');
            $rows->css('background','#eee'); // add a background color


There are many other things that you can do with Raxan Framework. Check out the full list of online examples.

air jordan 2 eminem edition for sale
Posts: 23
Reply #12 on : Sat January 12, 2019, 00:14:51
<a href="">new durable black yellow nike air max 95 women nike air max running shoe</a><a href="">black purple women air jordan 13 xiii</a><a href="">nike free flyknit con o sin calcetines</a><a href="">nike mercurialx proximo ii df tf electric green black ghost green</a>
[url=]air jordan 2 eminem edition for sale[/url]
nike air max 1 essential hyper crimson
Posts: 23
Reply #11 on : Wed March 20, 2019, 07:45:32
<a href="">wholesaler nike tennis classic ac prm triple black</a><a href="">nike kobe venomenon 6 black white men basketball shoes</a><a href="">nike running shoes for sale online fibreslystercom</a><a href="">nike air max 2017 kpu royal blue black white mens 898013 400</a>
[url=]nike air max 1 essential hyper crimson[/url]
nike air jordan retro 1 preschool schoenen
Posts: 23
Reply #10 on : Wed March 20, 2019, 21:08:13
<a href="">puma leadcat glitz grade school girls slide m?nd</a><a href="">nike damen wmns court royale turnschuhe</a><a href="">puma suede classic herre</a><a href="">nike air waffle leather sneaker zapatillas hombre zapatillas</a>
[url=]nike air jordan retro 1 preschool schoenen[/url]
cheap nike dunk sky high womens blackish green and black white
Posts: 23
Reply #9 on : Sun March 24, 2019, 08:53:39
<a href="">mens air max nike black white grey new</a><a href="">nike pg2 x playstation</a><a href="">all air force 1 shoes</a><a href="">fashion sneakers adidas yeezy boost 350 v2 cblack red footwear black red boost for sale</a>
[url=]cheap nike dunk sky high womens blackish green and black white[/url]
reebok transit zone
Posts: 23
Reply #8 on : Tue March 26, 2019, 17:14:24
<a href="">cheap nike free run 2 shoes lunarglide on the web</a><a href="">nike air flight huarache prm quai 54</a><a href="">nike air max 90 lthr iron metallic red brown sail mens womens 768887 201</a><a href="">blue red men air jordan 3 shoes</a>
[url=]reebok transit zone[/url]
zapatillas air max nostalgic midnight navy white black
Posts: 23
Reply #7 on : Wed March 27, 2019, 01:17:50
<a href="">chaussures adidas tubular x 2 0 pearl grey w</a><a href="">nike free powerlines purper</a><a href="">nike air force 1 low travis scott sail donna</a><a href="">nike lebron 12 elite team mujer</a>
[url=]zapatillas air max nostalgic midnight navy white black[/url]
new balance furon v4 dispatch in flame with aztec gold
Posts: 23
Reply #6 on : Wed March 27, 2019, 18:32:36
<a href="">men nike air jordan 11 future black blue nike huarache rose gold nike</a><a href="">air jordan 13 3d eyes black white red</a><a href="">nike jordan 1 flight low shoes for men white black black</a><a href="">nike air max 90 womenss shoes wholesale black white blue</a>
[url=]new balance furon v4 dispatch in flame with aztec gold[/url]
adidas adizero xt boost dam
Posts: 23
Reply #5 on : Thu March 28, 2019, 01:47:06
<a href="">nike air jordan spiz ike gs soar black schuhe damen</a><a href="">nike air presto triple black gs mujer</a><a href="">nike air max 90 lx beige womens 02 schuhe herren</a><a href="">asics gel tech walker neo 4 schuhe herren</a>
[url=]adidas adizero xt boost dam[/url]
nike lunar force 1 ns premium sko
Posts: 23
Reply #4 on : Tue April 02, 2019, 13:06:36
<a href="">chaussures adidas ultra boost uncaged clear grey w</a><a href="">nike lebron 14 mag m?skie</a><a href="">zapatillas puma sl street perf</a><a href="">reebok the shroud herre</a>
[url=]nike lunar force 1 ns premium sko[/url]
nike tennis classic ultra leather red
Posts: 23
Reply #3 on : Fri April 12, 2019, 16:49:35
<a href="">adidas cf advantage raw grey blue white men casual shoes sneakers da9638</a><a href="">nike kd trey 5 v ep 921540 010</a><a href="">adidas neo v racer 2 0 black white grey hombre</a><a href="">nike air max 97 ultra 17 buty sportowe m?skie 42 5</a>
[url=]nike tennis classic ultra leather red[/url]
First | Previous | Showing comments 11 to 20 of 22 | Next | Last

Leave a Comment

Required fields are marked with *.
If you have trouble reading the code, click on the code itself to generate a new random code.