IE8 Fieldset Legend bug fix


/ Published in: CSS
Save to your folder(s)

This IE8 bug causes the top half of a fieldset's border to not show when it contains a `` that is hidden with `display: none;`

The solution comes from [nicksnell.co.uk](http://nicksnell.co.uk/journal/2009/08/19/internet-explorer-8-fieldset-legend-bug). Be sure to put the following CSS into an IE8 conditional comment because it *will* fuck with other browsers' rendering.


Copy this code and paste it in your HTML
  1. <!--[if IE 8]>
  2. legend {
  3. display: block !important;
  4. height: 0;
  5. margin: 0;
  6. padding: 0;
  7. width: 0;
  8. visibility: hidden;
  9. }
  10. <![endif]-->

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.