如何能够在其中显示没有文本的表TD [英] How to be able to show Table TD's without text in them

查看:116
本文介绍了如何能够在其中显示没有文本的表TD的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题:
如何将表格的文本保留,而不会使其消失。

My Question: How can I leave a Table its TD without text, without making it disappear.

此HTML代码:

<div id="push_down"></div>

    <div id="global_wrapper">
       <table cellpadding="0" cellspacing="0" border="0" id="sep_table">
           <tr>
              <td id="side_1"></td>
              <td id="main"></td>
              <td id="side_2"></td>
           </tr>
      </table>
    </div>

此CSS代码:

html, body {
margin: 0px;
padding: 0px;
}

#push_down {
    padding-top: 53px;
}
#global_wrapper {
}
#sep_table {
    margin: 0px auto;
    width: 100%;
}
#side_1 {
    background:url(../images/navbar-bg-left.jpg) center repeat-x;
    height:78px;
}
#main {
    background:url(../images/navbar.jpg) center no-repeat;
    height:33px;
    width: 989px;
    padding-top:45px;
}
#side_2 {
    background:url(../images/navbar-bg-right.jpg) center repeat-x;
    height:78px;
}
.navbar{
    font-size:14px;
    font-weight:bold;
    color:#FFF;
}
.navbar a:link{
    color:#FFF;
    text-decoration:none;
}
.navbar a:visited{
    color:#FFF;
    text-decoration:none;
}
.navbar a:hover{
    color:#131313;
    text-decoration:none;
}
.navbar a:active{
    color:#FFF;
    text-decoration:none;
}


推荐答案

使用css:

table {
empty-cells:show;
}

在html(不是真的干净):

In html (not really clean):

<table>
<tr>
<td>&nbsp;</td>
</tr>
</table>

这篇关于如何能够在其中显示没有文本的表TD的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆