Center text in div?

To center horizontally, use text-align:center. To center vertically, one can only use vertical-align:middle if there is another element in the same row that it is being aligned to. See it working here. We use an empty span with a height of 100%, and then put the content in the next element with a vertical-align:middle. There … Read more

Remove extra button spacing/padding in Firefox

Add this: button::-moz-focus-inner { padding: 0; border: 0 } http://jsfiddle.net/thirtydot/Z2BMK/1/ Including the border rule above is necessary for buttons to look the same in both browsers, but also it removes the dotted outline when the button is active in Firefox. Lots of developers get rid of this dotted outline, optionally replacing it with something more … Read more

Spacing between flexbox items

The CSS spec has recently been updated to apply gap properties to flexbox elements in addition to CSS grid elements. This feature is supported on the latest versions of all major browsers. With the gap property, you can get what you want with just gap: 10px (or whatever size you want).

Spacing between thead and tbody

I think I have it in this fiddle and I updated yours: tbody:before { content: “-“; display: block; line-height: 1em; color: transparent; } EDIT better & simpler: tbody:before { content:”@”; display:block; line-height:10px; text-indent:-99999px; } This way text is really invisible

Evenly space multiple views within a container view

LOOK, NO SPACERS! Based on suggestions in the comments section of my original answer, especially @Rivera’s helpful suggestions, I’ve simplified my original answer. I’m using gifs to illustrate just how simple this is. I hope you find the gifs helpful. Just in case you have a problem with gifs, I’ve included the old answer below … Read more