html、PHP,网页设计,调整表格长度。表格格式被固定了,想把长度调小,怎么破?代码奉上

(我在body或table里加height没反应?)<style>body{text-align:left;font-family:'trebuchetMS','Luci... (我在body或table里加height没反应?)
<style>
body {
text-align:left;
font-family: 'trebuchet MS', 'Lucida sans', Arial;
font-size: 14px;
color: #444;
}
table {
*border-collapse: collapse; /* IE7 and lower */
width: 200px;
border-spacing: 0;
margin-top:40px;
margin-left:80px;
}
.bordered {
border: solid #ccc 1px;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 1px 1px #ccc;
-moz-box-shadow: 0 1px 1px #ccc;
box-shadow: 0 1px 1px #ccc;
}
.bordered tr:hover {
....略

}
.bordered td, .bordered th {
border-left: 1px solid #ccc;
border-top: 1px solid #ccc;
padding: 10px;
text-align: left;
}
.bordered th {
....略
}
.bordered td:first-child, .bordered th:first-child {
border-left: none;
}
.bordered th:first-child {
-moz-border-radius: 6px 0 0 0;
-webkit-border-radius: 6px 0 0 0;
border-radius: 6px 0 0 0;
}
.bordered th:last-child {
-moz-border-radius: 0 6px 0 0;
-webkit-border-radius: 0 6px 0 0;
border-radius: 0 6px 0 0;
}
.bordered th:only-child{
-moz-border-radius: 6px 6px 0 0;
-webkit-border-radius: 6px 6px 0 0;
border-radius: 6px 6px 0 0;
}
.bordered tr:last-child td:first-child {
-moz-border-radius: 0 0 0 6px;
-webkit-border-radius: 0 0 0 6px;
border-radius: 0 0 0 6px;
}
.bordered tr:last-child td:last-child {
-moz-border-radius: 0 0 6px 0;
-webkit-border-radius: 0 0 6px 0;
border-radius: 0 0 6px 0;
}
</style>
展开
 我来答
匿名用户
推荐于2018-05-07
展开全部
这个表格一般高度和宽度是自适应的,也就是你表格内部内容多就会变大,内容少就会变小,设置高宽也没用啊.不过给表格加这个两个属性overflow: hidden;display: block;就可以设置你想要的宽高了
博思aippt
2024-07-20 广告
作为深圳市博思云创科技有限公司的工作人员,对于Word文档生成PPT的操作,我们有以下建议:1. 使用另存为功能:在Word中编辑完文档后,点击文件->另存为,选择PowerPoint演示文稿(*.pptx)格式,即可将文档内容转换为PPT... 点击进入详情页
本回答由博思aippt提供
阿31d
2015-04-16 · TA获得超过499个赞
知道小有建树答主
回答量:704
采纳率:50%
帮助的人:267万
展开全部
width: 200px;

试着修改一下上面的宽度
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
时小爺
2015-04-16 · 超过10用户采纳过TA的回答
知道答主
回答量:26
采纳率:0%
帮助的人:11.2万
展开全部
table {
*border-collapse: collapse; /* IE7 and lower */
width: 200px;
border-spacing: 0;
margin-top:40px;
margin-left:80px;
}

不就是这个width嘛 改呗
追问
= =,我说的是长度的修改,宽度是可以的
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
匿名用户
2015-04-18
展开全部
table width="100%" 值可以随便改
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 更多回答(2)
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式