Skip to content

Commit

Permalink
Center viz on page
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismbryant committed Oct 25, 2020
1 parent 771851f commit 8d21857
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ table.footer-table td {
vertical-align: middle;
}

.push {
height: 0px;
.vertical-center {
margin: 0;
position: absolute;
top: 50%;
left: 50%;
-ms-transform: translate(-50%, -55%);
transform: translate(-50%, -55%);
}

.footer-text {
Expand Down
2 changes: 1 addition & 1 deletion js/visualization.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ function setupPage(svgWidth) {
let contentTable = content
.append("div")
.attr("id", "main-table")
.attr("class", "vertical-center")
.append("table");
addFooter(content);

Expand Down Expand Up @@ -151,7 +152,6 @@ function addFooter(content) {

const iconSize = 30;

content.append("div").attr("class", "push");
let footer = content.append("footer");

let row = footer
Expand Down

0 comments on commit 8d21857

Please sign in to comment.