2014-03-07 35 views
-1

, 我的链接标签如下,外部CSS不工作

<link href="<%=request.getContextPath()%>/css2/form.css" rel="stylsheet" TYPE="text/css"> 

CSS文件中有如下内容

@CHARSET "ISO-8859-1"; 

legend { 
padding: 0; 
margin-top:-20px; 
margin-left: -20px; 
margin-right:-40px; 
margin-bottom: -9px; 
border: 0; 
color: #999999; 
background-color: #918D8D; 
} 


.input-group{ 
margin-left:15px; 
} 

,我用这些类在jsp中如下,

<div class="form-group"> 
<label for="dob" class="control-label col-xs-4">Date Of 
         Birth(DOB) :</label> 
<div class="col-xs-8"> 
         <div class="col-lg-8 input-group date form_date1" data-date-format="dd MM yyyy" data-link-format="yyyy-mm-dd"> 
          <input type="text" class="form-control " size="10" name="dob" id="date" "> 
          <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span> 
          <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span> 
         </div> 
        </div> 
       </div> 

为什么它不工作,在这里我试图增加边际到te xt框。

+0

检查您的href链接 –

+0

右击并执行“查看源文件”,你可以点击链接查看,如果发现 – 2014-03-07 11:30:05

+0

页面点缺少在你的CSS。 它应该是'.legend'而不是'legend' –

回答

0

不知道你想要应用于你的文本框的CSS。但是,如果你想申请输入组到您的文本框,然后在下面所提到更新您的输入标签:

<input type="text" class="form-control input-group" size="10" name="dob" id="date" "> 

和下文提到的适用重要的CSS 输入组的边缘!

.input-group{ 
    margin-left:15px !important; 
} 
+0

如果我这样做我会在文本框中获取文本框。 。 – Raghavendra

+0

如果您这样做,您可以按照您提出的问题申请保证金。 – SpiderCode