.fieldset { border: 2px groove #778; padding: 2px; margin-bottom: 4px; } .legend { position: relative; top: -1em; left: 0.5em; background-color: #445; font-size: x-small; } .fieldset p { margin-top: -5px; }