Zprehledneni CSS
authorThomas Mudrunka <tomas@mudrunka.cz>
Mon, 19 Mar 2012 01:22:52 +0000 (02:22 +0100)
committerThomas Mudrunka <tomas@mudrunka.cz>
Mon, 19 Mar 2012 01:22:52 +0000 (02:22 +0100)
index.php

index 9da2fab2b99256a6859599184569f4265e4f3e4b..6ea65511a8c304213c8632c97c55d6440bb8b238 100755 (executable)
--- a/index.php
+++ b/index.php
@@ -37,10 +37,10 @@ require_once('Fortune.php');
 class HTML {
        function row($row,$type=false,$class=false,$parameters='',$colspan=array(),$rowspan=array(),$break_after=array()) {
                $html = '';
-               $class = $class ? $class=" class='$class' " : '';
+               $class_br = $class ? " class='$class' " : '';
+               $class = $class ? " class='$class tr_nobr' " : '';
                if($type) $html.="<$type>";
-               $tr="<tr$class$parameters>";
-               $html.=$tr;
+               $html.="<tr$class$parameters>";
                $td = $type == 'thead' ? 'th' : 'td';
                foreach($row as $id => $var) {
                        $tdclass = " class='cell_$id'";
@@ -48,7 +48,7 @@ class HTML {
                        $rs = isset($rowspan[$id]) ? " rowspan='$rowspan[$id]'" : '';
                        $cs = isset($colspan[$id]) ? " colspan='$colspan[$id]'" : '';
                        $html.="<$td$rs$cs$tdclass>$var</$td>";
-                       if(in_array($id,$break_after,true)) $html.='</tr>'.$tr;
+                       if(in_array($id,$break_after,true)) $html.='</tr>'."<tr$class_br$parameters>";
                }
                $html.='</tr>';
                if($type) $html.="</$type>";
@@ -207,7 +207,8 @@ class Sklad_HTML extends HTML { //TODO: Split into few more methods
 
 <style type="text/css">
 * { font-family: arial; }
-td,body { background-color: white; }
+td,body { background-color: white; border: orange; }
+.tr_nobr td { border-top: 3px solid orange; }
 table { background-color: orange; border: orange; }
 a, a img { text-decoration:none; color: darkblue; border:none; }
 li a, a:hover { text-decoration:underline; }
This page took 0.115492 seconds and 4 git commands to generate.