Jump to content

[SOLVED] DIV Problem/Query


s1yman

Recommended Posts

I have a template page that displays

<div class="div0">some text</div><div class="div1">some more text</div><div class="div2">even more text</div>

The div's are obviously defined in the css script, however the css is defined by a php query so it varies.

 

My question is, is there a way to code the div to stop it messing up the look of the page if it has been defined as

width:0%;

E.g. tell the div to ignore any text.

 

Thanks in advance

Link to comment
https://forums.phpfreaks.com/topic/120181-solved-div-problemquery/
Share on other sites

oh I've got it  ;D

 

{
width:0%;
display:none;
}

 

This stops the div from actually being displayed when it is called by the browser.

If anyone has any other ways, perhaps of just making the text disappear. Please let me know.

 

I don't think putting "width: 0%" is necessary. Display: none; should be enough. You can always use the visiblity property as well, except the div will still be there but hidden.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.