Notes to self

Easy solutions to tricky problems
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;