Skip to content

Commit

Permalink
Remove need to readjust margins in 404.html
Browse files Browse the repository at this point in the history
Since some of the users prefer to just modify the placeholder 404
page instead of replacing it with their own, this commit makes it
easier to do that by allowing them to modify the content without
worrying about readjusting the margins.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Note: The different in size compared to the old 404 is negligible:

 * old 404:

   original size:         1242 B
   gzipped size:           574 B

 * new 404:

   original size:         1274 B
   gzipped size:           570 B

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Ref: h5bp/html5-boilerplate#1567.
Close: h5bp/html5-boilerplate#1567.
  • Loading branch information
EvgenyOrekhov authored and alrra committed Jul 31, 2014
1 parent c05deda commit 9b55812
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
23 changes: 12 additions & 11 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@
<style>

* {
line-height: 1.5;
line-height: 1.2;
margin: 0;
}

html {
color: #888;
display: table;
font-family: sans-serif;
height: 100%;
text-align: center;
width: 100%;
}

body {
left: 50%;
margin: -43px 0 0 -150px;
position: absolute;
top: 50%;
width: 300px;
display: table-cell;
vertical-align: middle;
margin: 2em auto;
}

h1 {
Expand All @@ -32,19 +33,19 @@
}

p {
line-height: 1.2;
margin: 0 auto;
width: 280px;
}

@media only screen and (max-width: 270px) {
@media only screen and (max-width: 280px) {

body {
margin: 10px auto;
position: static;
body, p {
width: 95%;
}

h1 {
font-size: 1.5em;
margin: 0 0 0.3em 0;
}

}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### HEAD

* Remove need to readjust margins in `404.html`
([#1567](https://github.com/h5bp/html5-boilerplate/pull/1567)).
* Update to Apache Server Configs 2.7.0.
* Add `/.editorconfig` file
([#1561](https://github.com/h5bp/html5-boilerplate/issues/1561),
Expand Down

0 comments on commit 9b55812

Please sign in to comment.