2017-01-12 15 views
0

JSPページに入力フィールドがあり、それが画面中央に表示されますが、いろいろな方法が試された後でも同じです。入力を含むdivがこの画面の中央で入力フィールドを取得できません

<div class="text-center" id="keywordSelect"> 
 
    <div class="text-center"> 
 
     <p style='text-align:center'> 
 
      <input type="text" class="form-control" id="keyword" name="name" placeholder="Enter Keyword" style='width:30em;display:block'> 
 
     </p> 
 
    </div> 
 
    <div class="text-center"> 
 
\t  <button type="button" class="btn btn-success" id="keyword_button">View</button> 
 
    </div> 
 
</div>

+0

追加:) –

答えて

3

、画面の中心にあなたのフィールドが表示されます。このcode.itを試してみてくださいように見えます。

<div class="text-center" id="keywordSelect" align="center"> 
     <div class="text-center"> 
      <p> 
       <input type="text" class="form-control" id="keyword" name="name" 
        placeholder="Enter Keyword" style='width: 30em; display: block'> 
      </p> 
     </div> 
     <div class="text-center"> 
      <button type="button" class="btn btn-success" id="keyword_button">View</button> 
     </div> 
    </div> 
1

あなたのページの中央にすべてのものを持って `

....
`タグを追加することができます margin:0 auto

<input type="text" class="form-control" id="keyword" name="name" 
        placeholder="Enter Keyword" style='width: 30em; display: block; margin:0 auto;'> 
関連する問題