...

View Full Version : Help Needed for display:none.



mOrloff
11-10-2009, 10:45 PM
Alright, this isn't very complex, but I'm thoroughly stumped.
I've got a div which I simply want to hide. No biggie, right?
Well, evidently I am more wrong than I care to be :o

Here's what I'm trying to hide:

<div id="notification_msg" class="no_print" >
<em>Step <?PHP echo $form_number_of_steps;?> of
<?PHP echo $form_number_of_steps;?> -- INSTRUCTIONS
</em>
<br>
<br>
<ul>
<?PHP
if ($rma_voyager_mail_sent){
?>
<li>Please print this page and include it with the returning
package.
</li> ...
And here's the CSS:

div #branding, #mainNav, #contentHeading, #contentMenu, #notification_msg {
display: none;
}
.no_print{
display:none;
}

Now this is for media="print", but since I'm troubleshooting, I also dropped the CSS into the media="all" area.

I added the "no_print" class in my troubleshooting attempts.
Also, I verified that there aren't any additional <style> sections between the subject div and the CSS I'm working in.

Somebody PLEASE find what i am missing.
I am willing to answer any questions which may help.

~ Mo

EDIT: Additionally, if I use div#notification_msg>ul{display: none;}, then the UL behaves as expected. It does not display.

puffnstuff
11-10-2009, 10:56 PM
Not sure if this will work for your application, but this is what I have done in the past:

CSS:
#notification_msg span {
display: none;
}

Code:

<div id="notification_msg"><span>PUT THE STUFF YOU WANT HIDDEN HERE</span></div>

mOrloff
11-10-2009, 11:06 PM
OK, that helps, but not a complete fix.
Thanks for that tip. At least it helped troubleshoot the problem in one more way.

It works in the sense that all the content of the div gets hidden, but, the div itself is still visible. I need to hide the entire div.

Any explanations or additional tips/suggestions out there?
I still need help.

~ Mo

Arbitrator
11-11-2009, 02:59 AM
div#notification_msg>ul{display: none;}, then the UL behaves as expected. It does not display.Make sure that:

* This code is well-formed.
* There's no more specific selector declaring a different display value.
* You're in fact applying to the right media.
* There's no script setting a more specific style.

mOrloff
11-11-2009, 06:51 PM
Make sure that:

* This code is well-formed.
Check.


...that:
* There's no more specific selector declaring a different display value.
Check


...that:
* You're in fact applying to the right media.
Check


...that:
* There's no script setting a more specific style.
Oh what a GLORIOUS day. Hallelujah! :D
That was is it. There was a JS setting some fancy-pants display effects.
When I disabled JS, everything worked like a charm.

Thanks-a-Bunch.
~ Mo



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum