2017-08-09 90 views
-4

請幫助我,我可以讓我的CSS是形式....我怎樣才能讓這個以HTML5和CSS3

like this,

+4

1)學習HTM L. 2)學習CSS。 3)應用你學到的東西。 4)如果您有任何具體問題,請回到這裏。 –

+0

你不能用CSS做到這一點。 –

+0

歡迎來到stackoverflow,發佈之前,請確保嘗試任何東西..如果你是新的嘗試學習發佈之前..快樂的編碼 –

回答

2
<div class="container"> 
    <table> 
    <tr> 
     <td><p>Name</p><span>Add your name</span></td> 
     <td><input type="text" /></td> 
    </tr> 
    <tr> 
     <td><p>Email</p><span>Enter a valid email</span></td> 
     <td><input type="text" /></td> 
    </tr> 
    <tr> 
     <td><p>Phone</p><span>Add a phone number</span></td> 
     <td><input type="text" /></td> 
    </tr> 
    <tr> 
     <td><p>Priority</p><span>Priority level</span></td> 
     <td><select><option>Low</option></select></td> 
    </tr> 
    <tr> 
     <td><p>Type</p><span>Type of contact</span></td> 
     <td><select><option>Website Update</option></select></td> 
    </tr> 
    <tr> 
     <td><p>Message</p><span>Type your Message</span></td> 
     <td><textarea></textarea></td> 
    </tr> 
    </table> 
    <br> 
    <button>Submit</button> 
</div> 

CSS

body{ 
text-align:center; 
} 
.container{ 
    display: inline-block; 
    width: 800px; 
    height: 600px; 
    background-color: #ebf4fb; 
    border: 2px solid #d3e7f2; 
} 
table{ 
    display: inline-block; 
} 
td{ 
    text-align: right; 
    padding:5px 10px; 
} 
td > p{ 
    margin: 0; 
    padding: 0; 
    font-size:11pt; 
    font-weight: bold; 
} 
td > span{ 
    font-size: 9pt; 
} 

td > input[type=text]{ 
    width: 400px; 
    height: 30px; 
} 

td > textarea{ 
    width: 100%; 
    height: 200px; 
} 

button{ 
    width: 140px; 
    height: 50px; 
    background-color: black; 
    color: white; 
    border:none; 
} 

https://codepen.io/anon/pen/qXmaWL

+0

是否有另一種選擇,使該HTML表單? –