Notes to self

Easy solutions to tricky problems
May 11
Permalink
———————————————————————————
Tracking Conversion CSS “letter-spacing”
——————————————————————————— 1 =1/1000 em
100 =100/1000 em =0.10 em
200 =200/1000 em =0.20 em ———————————————————————————
May 10
Permalink

No scrollbar in Firefox

I came across this weird bug in Firefox. The scrollbar was missing, but I hadn’t even started any CSS yet. I figured the only special thing I’d done was setting a meta tag to get rid of those cartoon looking buttons in IE6/XP.

<meta http-equiv="MSThemeCompatible" content="no" />

Accidently it also strips Firefox of it’s scrollbar.

May 05
Permalink

Set <a> to display as a block element while inline

Want an anchor element to display as a block element while inline?

  • Parent <ul> as block with height.
  • Set parent <li> with line-height, not height.
  • Set <a> to display: inline-table;
  • Set <a> to display: inline-block;
May 01
Permalink
Apr 07
Permalink
Mar 30
Permalink
Mar 17
Permalink
Permalink

sIFR letter-spacing

  • No: letter-spacing: -1px;
  • Yes: letter-spacing: -1;

In js. Can’t use units for some reason.

Mar 04
Permalink
Feb 25
Permalink

jQuery can't get height(); because of floats

$(‘#myDiv’).height(); gives 0 because the contents of #myDiv are floated, so #myDiv has collapsed and actually do have 0px height.