Div文本不在DIV中

时间:2017-08-23 07:33:37

标签: html css asp.net webforms bootstrap-4

我有一行代码,然后是几个文本框和按钮。

但是文字已经脱离了div。试过溢出属性但没有帮助。

override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)       
  self.navigationController?.updateNavigationBar(withViewControllerID: self.restorationIdentifier?)
}

这是一个相同的小提琴:https://jsfiddle.net/2zfp3g4g/

enter image description here

2 个答案:

答案 0 :(得分:1)

overflow:hidden正在运作。您将overflow属性赋予复选框父div。



<link href="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
                   
<div class ="row no-gutter">        
        <div class ="col-sm-12" style="margin:8px 0px 0px 0px;padding-left:8px;padding-right:8px;">                         
                <div class ="row">
                    <div class ="col-sm-6" style="margin:8px 0px 0px 0px;padding-left:30px;padding-right:30px;">
                        <div id="MainContent_UpdatePanelCentrifugeSpinAndStep" >	                               
                                            <div class ="row">                                                                                  
                                                <div class ="col-sm-4 text-center" style="margin:2px 0px 0px 0px;padding-right:0px;">
                                                    <div class="form-control input-md" style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;" >
                                                        <input id="MainContent_chkLastCycle"  type="checkbox" name="ctl00$MainContent$chkLastCycle" />
                                                        End Day Production Re-set
                                                    </div>
                                                </div>
                                            </div>

                                        </div>
                                    </div>                            
</div>
&#13;
&#13;
&#13;

答案 1 :(得分:0)

似乎该复选框位于display: block。也许如果你将其设置为display: inline将解决它。