如何使用CSS <div>在另一个内部水平居中<div>?
<div id="outer">
<div id="inner">Foo foo</div>
</div>
Run Code Online (Sandbox Code Playgroud) 这是注册框:
http://technicaldebt.co.uk/fyp/register.php
我想把盒子放在网页中间.CSS附在下面.任何帮助将不胜感激.
/*********************************************************************************/
/* Basic */
/*********************************************************************************/
*
{
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body
{
background: #1e1e1e url(images/bg04.jpg) repeat;
font-family: 'Open Sans', sans-serif;
font-size: 11pt;
color: #7f7f7f;
}
form
{
}
form input,
form select,
form textarea
{
-webkit-appearance: none;
}
br.clear
{
clear: both;
}
p, ul, ol, dl, table
{
margin-bottom: 1em;
}
p
{
line-height: 1.7em;
}
a
{
color: #779c5b;
}
a:hover
{
text-decoration: none;
}
section,
article
{
margin-bottom: 3em;
} …Run Code Online (Sandbox Code Playgroud)