div

2011-03-07 10 views
36

में सीमा शीर्षक दें मैं HTML में इस तरह कर सकते हैं:div

मैं अपने div पर सीमा शीर्षक (इस छवि में "सामान्य जानकारी") जोड़ना चाहते हैं। क्या यह संभव है? यह कैसे करना है?


नोट:
छवि HTML पृष्ठ की छवि, अपने एक जावा अनुप्रयोग की छवि नहीं है।

उत्तर

46
<div id="form" style="width:350px;"> 
    <fieldset> 
     <legend style="color:blue;font-weight:bold;">General Information</legend> 
     <table> 
     <tr> 
      <td><span style="text-decoration:underline">C</span>hange Password To:</td> 
      <td><input type="text"/></td> 
     </tr> 
     <tr> 
      <td><span style="text-decoration:underline">C</span>onfirm Password:</td> 
      <td><input type="text"/></td> 
     </tr> 
     </table> 
    </fieldset> 
</div> 
+2

क्या सीमा के लिए फ़ील्डसेट का उपयोग करने के लिए यह अर्थात् सही ढंग से सही है? मैं सोचता हूं। – gamov

+0

Plnkr लिंक http://plnkr.co/edit/LpHRzFpEUz2BC5ZN2Q07?p=preview – Abhijeet

11

छवि संभवतः एक div के बजाय एक fieldset टैग का उपयोग कर रहा है, एक fieldset अंदर आप टैग legend उपयोग कर सकते हैं और यह अपने आप वहाँ की स्थिति होगी।

<fieldset> 
<legend>General Information</legend> 
</fieldset> 
+0

Thnx, यह नहीं एक html पृष्ठ की छवि। इसका जावा ऐप की छवि है। –

+0

मैं देखता हूं, शायद आपको इसे प्रश्न में जोड़ना चाहिए। – amosrivera

2
<fieldset style="width:100px;"> 

<legend> 

Please Enter Your Name</legend> 

<br> 

<table> 

<tr> 

<td>First Name:</td> 

<td><input type="text" /></td> 

</tr> 

<tr> 

<td>Last Name:</td> 

<td><input type="text" /></td> 

</tr> 

</table> 

</fieldset> 

यह यू इस तरह उत्पादन givu होगा।

enter image description here

0

पृष्ठभूमि रंग के साथ दौर सीमा।

<!DOCTYPE html> 
<html> 
<head> 
<style> 
.sample 
{ 
border:2px solid #a1a1a1; 
padding:10px 40px; 
background:#dddddd; 
width:300px; 
border-radius:25px; 
} 
</style> 
</head> 
<body> 

<div class="sample"> 
The border-radius property allows you to add rounded corners to elements. 

<fieldset style="width:100px;"> 

<legend> 

Please Enter Your Name</legend> 

<br> 

<table> 

<tr> 

<td>First Name:</td> 

<td><input type="text" /></td> 

</tr> 

<tr> 

<td>Last Name:</td> 

<td><input type="text" /></td> 

</tr> 

<tr> 

<td>First Name:</td> 

<td><input type="text" /></td> 

</tr> 

<tr> 

<td>Last Name:</td> 

<td><input type="text" /></td> 

</tr> 

</table> 

<input type="submit" value="Submit"> 


</fieldset> 

</div> 
</body> 
</html> 

यह इस तरह उत्पादन दे देंगे,

enter image description here