2016-09-16 143 views
0

我正在尝试建立一个文本框,其中填充了。但问题是它似乎没有工作我不知道它是高度还是填充但是肯定有什么问题,因为它曾经工作并且在我再次打开页面后它没有,我不知道为什么。CSS高度和填充不能正常工作

这里是CSS:

.Login-Textfield{ 
width:280px; 
height:20px; 
padding:15px; 
background-color:#EEE; 
border:none; 
outline:none; 
color:#222; 
text-align:right; 
font-size:20px; 
font-family:main; 
} 

这里是HTML:

<!-- Login --> 
<div class="Content-590"> 
    <div class="New-Offer-Header"><span class="FL"><img src="../images/logo-2.png" width="160" height="70" /></span><span class="FR"><img src="../images/offer-header.png" width="160" height="70" /></span></div> 
    <div class="New-Offer-Content"> 
     <form action="../ex/ad/create-offer.php" method="POST"> 
     <div class="New-Offer-570"> 
      <input type="text" name="title" class="New-Offer-Textfield-Long MB10" dir="rtl" placeholder="عنوان الإعلان" value="" /> 
     </div> 
     <div class="New-Offer-Right ML10"> 
      <select type="text" name="section" class="New-Offer-Select MB10" dir="rtl"> 
        <option>أختر القسم</option> 
        <option value="value">option</option> 
       </select> 
     </div> 
     <div class="New-Offer-Left"> 
      <input type="text" name="talent" class="New-Offer-Textfield MB10" dir="rtl" placeholder="الموهبه" value="<?php form_values('talent'); ?>" /> 
     </div> 
     <div class="New-Offer-570"> 
      <textarea type="text" name="description" class="New-Offer-Textarea MB10" dir="rtl" placeholder="الوصف"><?php form_values('description'); ?></textarea> 
     </div> 
     <div class="New-Offer-570 F28">:أرغب في</div> 
     <br /> 
     <div class="New-Offer-570"> 
      <div class="New-Offer-Remember"><input type="checkbox" name="work" class="Switch" id="work" /><label dir="rtl" for="work">تذكرني</label></div><div dir="rtl" class="New-Offer-Remember-Text F24">العمل</div> 
      <div class="New-Offer-Remember"><input type="checkbox" name="freelance" class="Switch" id="freelance" /><label dir="rtl" for="freelance">تذكرني</label></div><div dir="rtl" class="New-Offer-Remember-Text F24">العمل المستقل</div> 
     </div> 
     <div class="New-Offer-570"> 
      <div class="New-Offer-Remember"><input type="checkbox" name="part_time" class="Switch" id="part_time" /><label dir="rtl" for="part_time">تذكرني</label></div><div dir="rtl" class="New-Offer-Remember-Text F24">العمل الجزئي</div> 
      <div class="New-Offer-Remember"><input type="checkbox" name="train" class="Switch" id="train" /><label dir="rtl" for="train">تذكرني</label></div><div dir="rtl" class="New-Offer-Remember-Text F24">التدريب</div> 
     </div> 
     <div class="New-Offer-570"><center><input type="submit" class="New-Offer-Submit" value="!أضف موهبتك" /></center></div> 
     </form> 
    </div> 
</div> 

你能告诉是什么问题?

请访问网页:http://www.mawhibaty.com/login.php

回答

2

你的页面看起来好像没什么问题,所以我不知道是什么问题。但也许你不应该指定高度和填充。如果指定字体大小和填充,则高度应自动调整。如果指定字体大小和高度,则填充应自动调整。我认为你应该只定义三个中的两个:字体大小(包括字母上下的默认空白)和填充,字体大小和输入文本字段的高度。

+0

字体大小和填充主要是,虽然它应该没有太大的区别,但逻辑 – Ricky

+0

@Eileen_Jones我正在查看Chrome上的页面。昨天很好,我没有添加任何代码,它只是突然崩溃。文本框在查看时是否有填充?该页面是正确的?还是有一些有点错误? – FarrisFahad

0

文本输入字段确实有一些填充,但我不知道它是否尽可能多。我会尝试从你的CSS中删除“高度”,因为填充将决定高度。

0

我找到了一个解决方案... 我所需要的只是删除高度和填充将很适合文本字段。我不知道为什么,但它的工作。