Skip to content

Instantly share code, notes, and snippets.

@mjuhl
Created October 3, 2011 17:57
Show Gist options
  • Save mjuhl/1259770 to your computer and use it in GitHub Desktop.
Save mjuhl/1259770 to your computer and use it in GitHub Desktop.
Firefox fieldset element rendering bug #2
<!doctype html>
<html>
<head>
<title>Fieldset Issue 2</title>
<style>
body {
font-family: 'helvetica neue', arial, sans-serif;
}
fieldset {
border: #ccc 1px solid;
padding: 0px 0px 0px 100px;
width: 200px;
height: 100px;
display: block;
position: relative;
}
fieldset > p {
position: absolute;
top: 0;
left: 0;
display: inline-block;
border: #e00 1px solid;
font-size: 12px;
width: 100px;
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<form>
<fieldset class="scrollable">
<p>This &lsaquo;p&rsaquo; is absolutely positioned at left: 0, top: 0 relative to the fieldset (which has a gray border).</p>
</fieldset>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment