2017-12-20 5 views
0

This is how it is nowカレンダーアイコンをテキストボックスに移動しようとしましたが、移動できませんでした。私はこれを通過するのを手伝ってください。前もって感謝します。以下は、私は、Default.aspxファイルを持っているコードは次のとおりです。カレンダーアイコンをテキストボックスに移動しようとしています

<div class="row"> 
<div class="col-lg-12 col-md-12 col-xs-12"> 
<div class="col-lg-6 col-md-6 col-xs-6"> 
<asp:Label runat="server" CssClass="control-label">Date of Event: 
</asp:Label> 
          </div> 
          <div class="col-lg-6 col-md-6 col-xs-6"> 
           <asp:Calendar ID="DateOfEventCalender" runat="server" Visible="False" OnSelectionChanged="DateOfEventCalender_SelectionChanged" CalendarLocation="Bottom"></asp:Calendar> 
           <div class="right-inner-addon"> 
           <asp:LinkButton ID="Calendar2LinkButton" runat="server" CssClass="glyphicon glyphicon-calendar" CausesValidation="false" onclick="Calendar2LinkButton_Click"></asp:LinkButton>       
            <asp:TextBox ID="DateOfEventText" runat="server" CssClass="form-control calendarForm" ReadOnly="true"></asp:TextBox> 
            </div> 
          </div> 
         </div> 
         </div> 

Default.aspx.cs:

protected void DateOfEventCalender_SelectionChanged(object sender, EventArgs e) 
    { 
     DateOfEventText.Text = DateOfEventCalender.SelectedDate.ToShortDateString(); 
     DateOfEventCalender.Visible = false; 
    } 

    protected void Calendar2LinkButton_Click(object sender, EventArgs e) 
    { 
     DateOfEventCalender.Visible = true; 
    } 

Site.css:私は別のクラスを試してみましたが、違いはありません。

@media screen and (min-width: 768px) { 
.right-inner-addon i { 
    position: absolute; 
    right: 100px; 
    padding: 10px 12px; 
} 
} 

@media screen and (min-width: 0px) and (max-width: 479px) { 
.right-inner-addon i { 
    position: absolute; 
    margin-left: 150px; 
    margin-top: 0; 
    margin-bottom: 0; 
    margin-right: 0; 
    padding: 10px 12px ; 
} 
} 

@media screen and (min-width: 480px) and (max-width: 767px) { 
.right-inner-addon i { 
    position: absolute; 
    margin-left: 250px; 
    margin-top: 0; 
    margin-bottom: 0; 
    margin-right: 0; 
    padding: 10px 12px ; 
} 
} 

答えて

0

テキストボックスやアイコン位置保持divの割り当て:相対して、アイコンの位置割り当てる:絶対、右:0またはともトップ割り当てる:5pxのか、何でもあなたの条件に合っています。これらのプロパティを持つクラスを割り当てるか、単にインラインを追加することで、これを達成できます。

関連する問題