How to change an UILabel/UIFont’s letter spacing?

From iOS 6 you can use NSAttributedString in UILabel. In attributed string you can use attribute NSKernAttributeName to set letter spacing NSMutableAttributedString* attrStr = [[NSMutableAttributedString alloc] initWithString: @”Test test test test “]; [attrStr addAttribute:NSKernAttributeName value:@(4.0) range:NSMakeRange(0, attrStr.length)]; UILabel* label = [[UILabel alloc] initWithFrame:CGRectMake(0, 300, 300, 100)]; label.attributedText = attrStr;

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

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

Add spacing between vertically stacked columns in Bootstrap 4

Use the new Bootstrap 4 spacing utilities. For example mb-3 adds margin-bottom of 1rem. No extra CSS is needed. http://www.codeply.com/go/ECnbgvs9Ez <div class=”container”> <div class=”row”> <div class=”col-md-4 mb-3″> col 1 </div> <div class=”col-md-4 mb-3″> col 2 </div> <div class=”col-md-4 mb-3″> col 3 </div> <div class=”col-md-4 mb-3″> col 4 </div> <div class=”col-md-4 mb-3″> col 5 </div> <div … 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