Thursday, July 26, 2012

Using HTML "Fieldsets & Legends"

I had to use the "Legend" attribute of HTML in a project today, normally this is used in forms but I had to use it to post a Cautionary Statement on the home page of a project, you can take a live look at that here; http://samnelson.biz/jsr/ Also you can use the "View Source" option to check how I setup this stuff using aid from CSS. But there is one issue, I am still not able to find out a way to "center" the legend text i.e. "Cautionary Statement" here in IE. :) I am using IE 8 and it's showing it on the Left, both FireFox and Chrome are showing it in the center, for Chrome the css property "text-align:center;" works and for FireFox simple aligm="center" makes it in the middle of the top border, I also change the border style with CSS by using;
style="border: solid 1px #b9d9ed;"

You can find more help on this at this page: http://www.htmlgoodies.com/tutorials/forms/article.php/3479111/Fieldsets-and-Legends.htm 

6 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. this is such a nice and useful information for us...i appreciate urs word.......Digital Marketing Agency

    ReplyDelete
  3. This comment has been removed by a blog administrator.

    ReplyDelete
  4. This is very good blog and the page link you have shared about this is very helpful.

    ReplyDelete
  5. HTML Fieldsets are more than useful. They are also great in terms of usability for the visually impaired because screen readers use them.

    ReplyDelete

Please post your thoughts :)