I have this div:
<div class="inauguration-image">
I do not want this text to display, just here for description
</div>
Here is the css for it:
.inauguration-image {
margin-top:5px;
margin-left:auto;
margin-right:auto;
background: url("/images/inauguration_block.png") no-repeat;
position:relative;
width:760px;
height:552px;
}
I do not want the text to display, how would I go about doing that?
.inauguration-image {
margin-top:5px;
margin-left:auto;
margin-right:auto;
background: url("/images/inauguration_block.png") no-repeat;
position:relative;
width:760px;
height:0;
padding-top:552px;
overflow:hidden;
}
Setting height:0
and overflow:hidden
hides your text; padding-top:552px
makes the element large enough to display your background image, anyway. This is a very portable solution.
<div class="inauguration-image">
<p style="display:none">
I do not want this text to display,
just here for description
</p>
</div>
I don't think you're supposed to have uncontained text inside a div.
It's not quite clear what you're trying to do. If you're just trying to comment the div, use an HTML comment.
<div class="inauguration-image">
<!-- I do not want this text to display,
just here for description -->
</div>
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