Skip to content

Instantly share code, notes, and snippets.

@fgarcia
Created September 28, 2012 09:56
Show Gist options
  • Save fgarcia/3798946 to your computer and use it in GitHub Desktop.
Save fgarcia/3798946 to your computer and use it in GitHub Desktop.
Center block and do not wrap text around (sass)
@media only screen and (max-width: 450px)
.centerblock-when-small
float: none !important
margin-left: auto !important
margin-right: auto !important
text-align: center
display: table
@fgarcia
Copy link
Author

fgarcia commented Sep 28, 2012

Using display: table is usually better when the width is not known (except for IE6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment