+ -
当前位置:首页 → 问答吧 → Css; 要把Table 移去中间, 应该加入什么代码在Css?

Css; 要把Table 移去中间, 应该加入什么代码在Css?

时间:2011-06-10

来源:互联网

HTML code

<html>
<head>
<title></title>
    <style type="text/css">
    table {    width=70%;
        }
    </style>
</head>
<body>
    <table border="1">
        <tr>
        <td>Data Cell 1</td>
        <td>Data Cell 2</td>
        <td>Data Cell 3</td>
        <td>Data Cell 4</td>
        </tr>
    </table>
</body>
</html>

作者: L3nnon   发布时间: 2011-06-10

CSS code

table {    width=70%;
       border-collapse:collapse;
        }

作者: inetfuture   发布时间: 2011-06-10

引用 1 楼 inetfuture 的回复:

CSS code

table { width=70%;
border-collapse:collapse;
}

CSS code

<html>
<head>
<title></title>
    <style type="text/css">
    table {    width=70%;
        border-collapse:collapse;}

    </style>
</head>
<body>
    <table>
        <tr>
        <td>Title Cell 1</td>
        <td>Title Cell 2</td>
        <td>Title Cell 3</td>
        <td>Title Cell 4</td>
        </tr>


没效果, Collapse 不是折叠吗???

作者: L3nnon   发布时间: 2011-06-10

HTML code

<html>
<head>
<title></title>
    <style type="text/css">
    table {    width=70%;margin:0 auto;
        }
    </style>
</head>
<body>
    <table border="1">
        <tr>
        <td>Data Cell 1</td>
        <td>Data Cell 2</td>
        <td>Data Cell 3</td>
        <td>Data Cell 4</td>
        </tr>
    </table>
</body>
</html>


到中间去 ?

作者: zell419   发布时间: 2011-06-10

引用 3 楼 zell419 的回复:

HTML code

<html>
<head>
<title></title>
<style type="text/css">
table { width=70%;margin:0 auto;
}
</style>
</head>
<body>
<table border="1">
<tr>
<td>Dat……

对~ 要在中间~

作者: L3nnon   发布时间: 2011-06-10