s1yman Posted August 18, 2008 Share Posted August 18, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/120181-solved-div-problemquery/ Share on other sites More sharing options...
s1yman Posted August 18, 2008 Author Share Posted August 18, 2008 oh I've got it { 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. Quote Link to comment https://forums.phpfreaks.com/topic/120181-solved-div-problemquery/#findComment-619129 Share on other sites More sharing options...
TheFilmGod Posted August 18, 2008 Share Posted August 18, 2008 oh I've got it { 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. Quote Link to comment https://forums.phpfreaks.com/topic/120181-solved-div-problemquery/#findComment-619331 Share on other sites More sharing options...
s1yman Posted August 18, 2008 Author Share Posted August 18, 2008 yeah I know, I just thought the width 0% would come in handy when I'm half asleep looking at the scripts & wondering why the div has disappeared lol Quote Link to comment https://forums.phpfreaks.com/topic/120181-solved-div-problemquery/#findComment-619342 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.