2014-09-24 55 views
-1

我是HTML新手,在一個網站上工作,我需要這個文本框出現在中心,因爲它看起來相當奇怪的左側(請幫我做編輯在HTML,以及:請幫我定位一個文本框

<!-- Job Opportunities --> 
<div class="wrapper wrapper-style3"> 
    <article id="careers"> 
     <header> 
       <h2>Careers</h2> 

     </header> 
     <div class="container"> 
      <div class="row"> 
       <div class="12u"></div> 
      </div> 
      <div class="row"> 
       <div class="4u"> 
        <article class="box box-style2"> 
          <h3>Work With Us</h3> 

         <p>We are looking for enthusiastic, detail-orientated professionals to assist in our continued growth. As a small firm, we reward flexibility with excellent conditions and an enjoyable working environment. Rapid career progression is possible for candidates demonstrating the right characteristics. Please contact us, enclosing a CV, for details of our current vacancies.</p> 
       </div> 
      </div> 
      </article> 
     </div> 
+1

你錯過了在你的榜樣關閉文章和div標籤。另外,你嘗試過哪些CSS? – j08691 2014-09-24 20:44:36

+0

關閉文章標籤時放置的小姐 – Huangism 2014-09-24 20:45:48

+0

是的,我已經添加了標籤,我只需要文本框出現在中心。我通過記事本,小修改工作做這件事,但不是我的特長。 – 2014-09-24 20:53:59

回答

0

<head><style>元素創建CSS類:

.centered { width:70%; margin: 0 auto; } 

添加CSS類的div:

<!-- Job Opportunities --> 
<div class="wrapper wrapper-style3 centered"> 
    <article id="careers"> 
     <header> 
       <h2>Careers</h2> 

     </header> 
     <div class="container"> 
      <div class="row"> 
       <div class="12u"></div> 
      </div> 
      <div class="row"> 
       <div class="4u"> 
        <article class="box box-style2"> 
          <h3>Work With Us</h3> 

         <p>We are looking for enthusiastic, detail-orientated professionals to assist in our continued growth. As a small firm, we reward flexibility with excellent conditions and an enjoyable working environment. Rapid career progression is possible for candidates demonstrating the right characteristics. Please contact us, enclosing a CV, for details of our current vacancies.</p> 
        </article> 
       </div> 
      </div> 
     </div> 
    </article> 
</div> 

的jsfiddle:http://jsfiddle.net/3Ly1s3tv/

+0

謝謝,但文本框仍然出現在左側。 – 2014-09-24 21:02:26

+0

這是一個靜態網站的一部分,每個部分有六個框,以兩組三個對齊在一起。既然招聘部門只有一個箱子,我希望它是居中。 – 2014-09-24 21:10:09

+0

這個論壇並不是一個教程網站。我建議你做一個關於如何使用CSS來集中HTML元素的搜索。 – joym8 2014-09-24 21:18:15