我有两个按钮位于一个 div 中,但我希望它们占据垂直剩余的整个空间。
刚才,它看起来像这样:
Header
---------------------------
BUTTON 1
BUTTON 2
---------------------------
FOOTER
如何让两个提交按钮占据整个空间?
HTML:
<body>
<header>
<h1>{title}</h1>
</header>
<div id="wrapper">
<div id="main-content">
<!--<div class="innerInstructions">Choose your direction.</div>-->
<form action="app-web.php" method="get" class="main-form clocking">
<input type="hidden" name="do" value="performclock" />
<input type="hidden" name="uid" id="uid" value="'.$uid.'" />
<input type="submit" name="clockaction" value="IN →" accesskey="I" />
<input type="submit" name="clockaction" value="← OUT" accesskey="O" />
</form>
</div>
</div>
<footer>
<div id="time">{time}</div>
</footer>
</body>
CSS:
#wrapper {
position:absolute;
z-index:1;
top:45px; bottom:48px; left:0;
width:100%;
overflow:none;
}
#main-content {
position:absolute;
z-index:1;
width:100%;
padding:0;
color: white;
height: 100%;
}
.clocking{
margin-top: 5px;
}
.clocking input[type="submit"]{
/*width: 45%;*/
/*padding-top: 10%;
padding-bottom: 10%;*/
height: 100%;
min-height: 100%;
font-size: 2em;
font-weight: bold;
background:#deb500;
border: 1px solid white;
color: white;
border-radius: 5px;
}