2011-08-03 105 views
-2

我如何設計我的div(「個人信息」部分)看起來像下面的例子。我該如何設計html?

enter image description here

+4

嘗試閱讀有關CSS和HTML的一些東西 – Calum

+0

@Calum這樣的評論根本沒有幫助。 –

+1

嗨,問題已經結束,所以我無法回答。這不是最好的方法,但是,這是我能想到的:http://jsfiddle.net/BTJLB/ – iamserious

回答

4
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd"> 
<html> 
    <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
    <title>Title</title> 
    <style type="text/css"> 
     .personal_information label { display: inline-block; padding-right: 10px; text-align: right; width: 200px; } 
    </style> 
    </head> 
    <body> 
    <div class="personal_information"> 
     <h1>Booking</h1> 
     <fieldset> 
     <legend>Personal Information</legend> 
     <label for="first_name">First Name</label><input id="first_name" name="first_name" /><br /> 
     <label for="last_name">Last Name</label><input id="last_name" name="last_name" /> 
     </fieldset> 
    </div> 
    </body> 
</html> 
+0

感謝斯泰西。我知道了=) –

3

這可能是一個<fieldset>

+0

謝謝。這是我需要知道的。我知道它可以用html/css存檔,但我不知道它是如何調用的。 –