Reputation: 73
I'm trying to use a fieldset but it is not working as exactly i wanted... The legend is displayed outside fieldset...But I want it covered like normal fieldsets. My code is,
<fieldset style="border:1px solid #999; border-radius:8px; box-shadow:0 0 8px #999;padding:6px;">
<legend style="text-align: left;margin-top:-15px;">References</legend>
//Some Text...
</fieldset>
Upvotes: 4
Views: 12554
Reputation: 766
I think this issue is in the margin-top:-15px;
, specifically in the -15px
which is making the margin -15px
larger (in other words 15px
smaller!).
Example(Without margin-top:-15px;
):
<fieldset style="border:1px solid #999; border-radius:8px; box-shadow:0 0 8px #999;padding:6px;">
<legend style="text-align: left;">References</legend>
//Some Text...
</fieldset>
Upvotes: 0