[PATCH 5/5] httpd_indexcgi.c: Simplify columns CSS style

Sergey Ponomarev stokito at gmail.com
Fri Jul 10 19:48:16 UTC 2020


Colgroup is used only to group/merge columns and not needed here.

Signed-off-by: Sergey Ponomarev <stokito at gmail.com>
---
 networking/httpd_indexcgi.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/networking/httpd_indexcgi.c b/networking/httpd_indexcgi.c
index 8978a9c1a..7d8f8e8af 100644
--- a/networking/httpd_indexcgi.c
+++ b/networking/httpd_indexcgi.c
@@ -78,14 +78,9 @@ httpd_indexcgi.c -o index.cgi
 "thead, tfoot { background-color:olive }"              \
 "tbody tr:nth-child(even) { background-color:beige }"  \
 "tbody tr:hover {  background-color:ivory }"           \
-"th.cnt { text-align:left }"                           \
-"th.sz { text-align:right }"                           \
-"th.dt { text-align:right }"                           \
-"td.sz { text-align:right }"                           \
-"td.dt { text-align:right }"                           \
-"col.nm { width:98% }"                                 \
-"col.sz { width:1% }"                                  \
-"col.dt { width:1% }"                                  \
+".nm { text-align:left; width:98% }"                   \
+".sz { text-align:right; width:1% }"                   \
+".dt { text-align:right; width:1% }"                   \
 "</style>"                                             \
 
 typedef struct dir_list_t {
@@ -285,9 +280,8 @@ int main(int argc, char *argv[])
 	fmt_str(
 		"</h1>"
 		"<table>"
-		"<col class=nm><col class=sz><col class=dt>"
 		"<thead>"
-		"<tr><th class=cnt>Name<th class=sz>Size<th class=dt>Last modified"
+		"<tr><th class=nm>Name<th class=sz>Size<th class=dt>Last modified"
 		"</thead>"
 		"<tbody>");
 
-- 
2.25.1



More information about the busybox mailing list