Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.