Style for form legend : legend « Form « HTML / CSS






Style for form legend

  


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <title>Forms</title>
  <style type="text/css" media="screen">
  #divID #thisform legend {
    font-family: arial, sans-serif;
    font-weight: bold;
    font-size: 90%;
    color: #666;
    background: #eee;
    border: 1px solid #ccc;
    border-bottom-color: #999;
    border-right-color: #999;
    padding: 4px 8px;
    }
  </style>
</head>
<body>

<div id="divID">
<form action="" id="thisform" method="post">
  <fieldset>
    <legend>Sign In</legend>
    <p><label for="name" accesskey="9" >Name:</label><br />
    <input type="text" id="name" name="name" tabindex="1" /></p>
    <p><label for="email">Email:</label><br />
    <input type="text" id="email" name="email" tabindex="2" /></p>
    <p><input type="checkbox" id="remember" name="remember" tabindex="3" /> 
    <label for="remember">Remember this info?</label></p>
    <p><input type="submit" value="submit" tabindex="4" /></p>
  </fieldset>
</form>
</div>

</body>
</html>

   
  








Related examples in the same category

1.The legend element
2.Set style for legend
3.form legend style
4.Set font, color, background color and text-transform for legend tag
5.Organizing Elements With fieldset and legend Elements
6.legend top: -.4em;
7.legend position: relative;
8.legend font-size: 1.4em;
9.legend font-weight: bold;
10.Set form access key
11.legend border: 1px solid #888; border-right: 1px solid #666; border-bottom: 1px solid #666;
12.legend padding: .5em;
13.legend background-color: #CCC;
14.legend background: gold;
15.legend border: 1px solid rgb(75, 75, 75);
16.legend color: rgb(75, 75, 75);