Customize The Repeat Region Table
hi,
i listed database items in dynamic table , sorted using repeat region function date.
how can change table cells background color date?
i listed data , i want to use different color each day.
how can this?
thanks.
try
<?php $date = '2015-11-11'; ?> <!doctype html> <html lang=""> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <title>untitled</title> <link rel="shortcut icon" href=""> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css"> <style> .c1 { background: yellow; } .c2 { background: red; } .c3 { background: blue; } .c4 { background: green; } .c5 { background: white; } .c6 { background: gray; } .c7 { background: black; } </style> <!--[if ie]> <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <table class="table"> <tr> <th>date</th> <th>description</th> <th>remarks</th> </tr> <tbody> <tr class="c<?php echo date('n', strtotime($date)); ?>"> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> </body> </html>
More discussions in Dreamweaver support forum
adobe
Comments
Post a Comment