I'm encountering some really weird behavior with a div inside a fieldset. Please have a look at this code:
The div is definitely not 50% of the fieldset in width even though it's set to be.Code:<html> <head></head> <body> <fieldset style="width: 50%;"> <legend>legend</legend> <div style="background-color: blue; display: table-cell; width: 50%;"> This is a fieldset. </div> </fieldset> </body> </html>
What's even weirder is that if I set the div to be 100% width, it takes up even less space.
Does anyone know what's going on here?



Reply With Quote

Bookmarks