My Question: How can I leave a Table its TD without text, without making it disappear.
I use this HTML code:
<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>
And this CSS code:
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;
}
If you want to prevent the text from wrapping, you can apply white-space: nowrap; Notice in HTML code example at the top of this article, there are actually two line breaks, one before the line of text and one after, which allow the text to be on its own line (in the code).
Syntax: white-space: normal|nowrap|pre|pre-wrap|pre-line; Example 1: This example uses white-space property to prevent cell wrapping using CSS.
To use the CSS overflow property with its "hidden" value on the HTML <td> element, you need to set the table-layout property with the "fixed" value and an appropriate width on the <table> element. Then, you need to add the overflow property set to "hidden" and white-space property set to "nowrap" on the table cell.
With css:
table {
empty-cells:show;
}
In html (not really clean):
<table>
<tr>
<td> </td>
</tr>
</table>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With