Css 居中显示:表格行UL/LI列表
我有一个调用模板的php页面:Css 居中显示:表格行UL/LI列表,css,list,center,css-tables,tablerow,Css,List,Center,Css Tables,Tablerow,我有一个调用模板的php页面: if(!isset($_GET['step']) || $_GET['step'] == "" || $_GET['step'] == 1) { include("templates/install_db.html"); } elseif(isset($_GET['step']) && $_GET['step'] == 2) { include("templates/install_settings.html"); } <h
if(!isset($_GET['step']) || $_GET['step'] == "" || $_GET['step'] == 1)
{
include("templates/install_db.html");
}
elseif(isset($_GET['step']) && $_GET['step'] == 2)
{
include("templates/install_settings.html");
}
<head>
<link href="templates/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body style="background-color:cadetblue">
<div class="title"><h1>...</h1></div>
<div class="main">
<form action="?step=2" method="post">
<ul>
<li>
Database Host:
</li>
<li>
<input type="text" name="host" value="localhost" />
</li>
</ul>
<ul>
<li>
Database Username:
</li>
<li>
<input type="text" name="uname" />
</li>
</ul>
</form>
</div>
...
install_db.html模板:
if(!isset($_GET['step']) || $_GET['step'] == "" || $_GET['step'] == 1)
{
include("templates/install_db.html");
}
elseif(isset($_GET['step']) && $_GET['step'] == 2)
{
include("templates/install_settings.html");
}
<head>
<link href="templates/css/style.css" rel="stylesheet" type="text/css" />
</head>
<body style="background-color:cadetblue">
<div class="title"><h1>...</h1></div>
<div class="main">
<form action="?step=2" method="post">
<ul>
<li>
Database Host:
</li>
<li>
<input type="text" name="host" value="localhost" />
</li>
</ul>
<ul>
<li>
Database Username:
</li>
<li>
<input type="text" name="uname" />
</li>
</ul>
</form>
</div>
...
我想把ul/li列表放在中间。。。如果删除表格行/表格单元格,则列表将以其他方式居中,并保持在左侧。在我看来,名单应该居中。我做错了什么
更新:我使用上一个google chrome版本作为浏览器我已经找到了解决方案。。。text align属性不适用于表行、表单元格等显示类型,因此我在表单中添加了另一个
,并将该div的显示设置为内联块
,这就解决了。我找到了解决方案。。。text align属性不适用于表行、表单元格等显示类型,因此我在表单中添加了另一个
,并将该div的显示设置为内联块
,这就解决了