428423-1a.html (370B)
1 <html> 2 <head><style> 3 fieldset, legend { margin: 0px; padding: 0px; } 4 fieldset { 5 width: 20em; 6 text-align: right; 7 border: 0px; 8 } 9 legend { display: block; } 10 .orange { background: orange } 11 </style></head> 12 <body> 13 The orange box should only be as wide as its text. 14 <fieldset> 15 <legend class="orange">foo</legend> 16 </fieldset> 17 </body> 18 </html>