-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404.html: better content vertical alignment #1567
Conversation
Content vertical alignment using display: table for <html> and display: table-cell for <body>.
Thanks for this PR, @EvgenyOrekhov. |
Update `CHANGELOG.md`
@drublic done |
…to 404-centrify Conflicts: CHANGELOG.md
@drublic, did I mess something up? Sorry, I'm new to Git and GitHub. |
@EvgenyOrekhov don't worry, if it's going to be merge, we'll handle it! IMHO it looks better when the second line isn't so long (maybe add something like Note(s):
|
@alrra I set width to 310px to make sure the word "view" stays on the first line in mobile browsers. I liked the new 404 page, so I kept using it as it is in my projects, but I kept struggling with proper vertical alignment when I localized the page, so I suggested some h5bp users would also benefit from this change. P. S. Am I doing it right? I should commit, then |
@alrra I do think some of the users never touch the 404 page layout. Some just change/translate the text. For those users it will be better if we use this technique for vertical centering. With the technique we use right now the vertical alignment will break for them. |
@EvgenyOrekhov thanks, will check as soon as I get home.
@EvgenyOrekhov After you make your changes and staged them, you can just I highly recommend: Pro Git.
@EvgenyOrekhov, @arthurvr good to know that people are actually building upon it! |
@alrra thanks, I thought "do not rewrite public history" is a strict rule. |
@EvgenyOrekhov yes, when it comes to the |
@@ -33,11 +33,18 @@ | |||
|
|||
p { | |||
line-height: 1.2; | |||
margin: auto; | |||
width: 310px; | |||
} | |||
|
|||
@media only screen and (max-width: 270px) { |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
@EvgenyOrekhov played a little bit and ended by with this.
|
Looking good! |
@alrra nice, but it would be even nicer if the line break appeared right after "view", so it could be like
Don't you think? |
Note: I've improved the page a little bit more (my previous comment has been updated).
@EvgenyOrekhov personally I find it nicer the way it is now. :) |
@alrra, applied your changes. |
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: #1567. Close: #1567.
Merged in c3a72ff. Thanks @EvgenyOrekhov and congrats on your first HTML5 Boilerplate contribution! 🎉 👏 |
Thanks everyone! You made a great first impression of GitHub community! |
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. Ref h5bp/html5-boilerplate#1567 Close #219
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.
Content vertical alignment using
display: table
for<html>
anddisplay: table-cell
for<body>
.That way one can modify the content and don't worry about readjusting the margin.