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.

nike air max tr 180 femme
Posts: 23
Reply #2 on : Sat April 13, 2019, 06:29:56
<a href="">scarpe italia 2016 uomo nike air max tn nere royal blu bianche miglior prezzo</a><a href="">mejores zapatillas running nike free run 3 hombre verde zapatillas de correr</a><a href="">adidas pro model grey white gold metallic homme</a><a href="">nike mercurial victory vi ic fussballschuhe gelb silber blau</a>
[url=]nike air max tr 180 femme[/url]
adidas tour 360 boost scarpe da golf uomo bianco white core black 46 eu
Posts: 23
Reply #1 on : Mon April 29, 2019, 07:50:21
<a href="">nike air foamposite pro yeezy uomo</a><a href="">comprar nike air max 1 desert camo baratas espa?a outlet online</a><a href="">nike kd 10 veterans day dames</a><a href="">nike air max 90 grey sko</a>
[url=]adidas tour 360 boost scarpe da golf uomo bianco white core black 46 eu[/url]
First | Previous | Showing comments 21 to 22 of 22

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.