【问题标题】:How to display two div and button between如何在两个div和按钮之间显示
【发布时间】:2015-12-24 17:48:43
【问题描述】:

我正在尝试显示两个 div,一个在左侧(输入),一个在右侧(右侧),在它们之间有一个按钮(它是一个 asp.net Web 项目),但即使我尝试使用 float:left 和 right or margin left: %, I could not do it.Here is my css file;

.input{
    background-color:rgba(23, 23, 23, 0.71);

    border: 2px solid grey;
    width: 450px;
    height: 550px;   
    float: left;
    margin-left:0px;    
    border-radius: 25px;

    padding: 10px; 


    }
.roundcorner //this class is for button
{
border:2px solid #a1a1a1;
text-align: center; 

font-size:18px;
margin-left:45%;
margin-top:35px;
font-style:oblique;
background:#a1a1a1;
width:70px;
border-radius:25px;
-moz-border-radius:35px; /* Firefox 3.6 and earlier */
}

 .output{
    background-color:rgba(23, 23, 23, 0.71);
    border: 2px solid grey;
    width: 270px;
    height: 550px;   
    margin-left: 65%;
    margin-right:15px;
    border-radius: 25px;
        padding: 10px; 


    }

【问题讨论】:

标签: css asp.net button alignment divide


【解决方案1】:

见下文...

.container{
  width:100%;
  font-family:arial;
  }

.box{
  padding-top:60px;
  width:33%;
  height:100px;
  text-align:center;
  display:inline-block;
  zoom:1;
  *display:inline;
  }

.box.left{
  float:left;
  background-color:#ddd;
  }
.box.right{
  float:right;
  background-color:#ddd;
  }
<div class="container">
  <div class="box left">Left div</div>
  <div class="box">
    <button>I'm a button</button>
  </div>
  <div class="box right">Right div</div>
</div>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-30
    • 1970-01-01
    • 2012-06-28
    • 2021-04-25
    • 2020-03-03
    • 1970-01-01
    相关资源
    最近更新 更多