summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/footer.html1
-rw-r--r--src/header.html3
-rw-r--r--style.css3
3 files changed, 5 insertions, 2 deletions
diff --git a/src/footer.html b/src/footer.html
index d257158..04a3704 100644
--- a/src/footer.html
+++ b/src/footer.html
@@ -1,3 +1,4 @@
+</div>
</pre>
</body>
<!--
diff --git a/src/header.html b/src/header.html
index 1c70356..84dec30 100644
--- a/src/header.html
+++ b/src/header.html
@@ -5,7 +5,8 @@
<link rel="stylesheet" href="style.css">
</head>
<body>
-<pre class="content">
+<div class="content">
+<pre>
<!--
123456789-223456789-323456789-423456789-523456789-623456789-723456789-8234567890
一二三四
diff --git a/style.css b/style.css
index bd0ce07..75c5bc6 100644
--- a/style.css
+++ b/style.css
@@ -14,12 +14,13 @@ a:hover {
}
.content {
/*the following works together to center the entire element*/
- position:relative;
+ position:relative; /* allows for translation*/
left:50%; /* this shifts the element to the right by 50% of its parent*/
display: inline-block; /* this makes the element only as wide as it needs to be*/
transform:translatex(-50%);/*this shifts it to the left by half its own width*/
}
img {
+ position: absolute; /*parent now ignores it's size when calculating size*/
display: block;
/*overrides not margin to center from bounds of the <pre> tag*/
margin-left: auto;