From f3d76a953b5fc0e63e9ef614a7056d0adc28d759 Mon Sep 17 00:00:00 2001 From: davemachado Date: Tue, 15 Aug 2017 23:13:58 -0400 Subject: [PATCH] update CSS ordering --- src/index.html | 22 ++++++++++++---------- src/scripts.js | 2 +- src/styles.css | 41 ++++++++++++++++++++++++----------------- 3 files changed, 37 insertions(+), 28 deletions(-) diff --git a/src/index.html b/src/index.html index e0cd952..09dc1ea 100644 --- a/src/index.html +++ b/src/index.html @@ -7,22 +7,24 @@ Public APIs +
+

+ Public APIs +

+

+ A collective list of free APIs for use in web development +

+

+ For information on contributing to this project, please see the contributing guide +

+
-

- Public APIs -

-

- A collective list of free APIs for use in web development -

-

- For information on contributing to this project, please see the contributing guide -

- +
diff --git a/src/scripts.js b/src/scripts.js index 33594ea..de9626a 100644 --- a/src/scripts.js +++ b/src/scripts.js @@ -48,7 +48,7 @@ function filterRows() { var input, filter, table, tr, td, i; input = document.getElementById("searchbox"); filter = input.value.toUpperCase(); - table = document.getElementById("myTable"); + table = document.getElementById("entries"); tr = table.getElementsByTagName("tr"); // Loop through all table rows, and hide those who don't match the search query diff --git a/src/styles.css b/src/styles.css index 809bb08..37d6612 100644 --- a/src/styles.css +++ b/src/styles.css @@ -1,8 +1,8 @@ body { - font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; border-collapse: collapse; + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + text-align: center; width: 100%; - table-layout: fixed; } #entries td, #entries th { @@ -10,19 +10,26 @@ body { padding: 8px; } -#entries tr:nth-child(even){background-color: #f2f2f2;} - -#entries tr:hover {background-color: #ddd;} - -#entries th { - padding-top: 12px; - padding-bottom: 12px; - text-align: center; - background-color: #4783e5; - color: white; +#entries tr:nth-child(even) { + background-color: #f2f2f2; } -.center-text { +#entries tr:hover { + background-color: #ddd; +} + +#entries { + border-collapse: collapse; /* Collapse borders */ + border: 1px solid #ddd; /* Add a grey border */ + font-size: 18px; /* Increase font-size */ + width: 100%; /* Full-width */ +} + +#entries th { + background-color: #4783e5; + color: white; + padding-top: 12px; + padding-bottom: 12px; text-align: center; } @@ -31,11 +38,11 @@ body { } #searchbox { - text-align: center; + border: 1px solid #ddd; /* Add a grey border */ border-radius: 50px; - width: 50%; /* Full-width */ + margin-bottom: 12px; /* Add some space below the input */ font-size: 16px; /* Increase font-size */ padding: 12px 20px 12px 40px; /* Add some padding */ - border: 1px solid #ddd; /* Add a grey border */ - margin-bottom: 12px; /* Add some space below the input */ + text-align: center; + width: 50%; /* Full-width */ } \ No newline at end of file
API