Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder mOrloff's Avatar
    Join Date
    Nov 2008
    Location
    The Great Pacific NW, USA
    Posts
    422
    Thanks
    8
    Thanked 6 Times in 6 Posts

    Help Needed for display:none.

    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

    Here's what I'm trying to hide:
    PHP Code:
    <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:
    Code:
    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.
    Last edited by mOrloff; 11-10-2009 at 10:50 PM. Reason: More info

  • #2
    New Coder
    Join Date
    Nov 2009
    Posts
    18
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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>

  • #3
    Regular Coder mOrloff's Avatar
    Join Date
    Nov 2008
    Location
    The Great Pacific NW, USA
    Posts
    422
    Thanks
    8
    Thanked 6 Times in 6 Posts
    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
    Last edited by mOrloff; 11-11-2009 at 12:43 AM.

  • #4
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,274
    Thanks
    28
    Thanked 271 Times in 265 Posts
    Quote Originally Posted by mOrloff View Post
    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.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #5
    Regular Coder mOrloff's Avatar
    Join Date
    Nov 2008
    Location
    The Great Pacific NW, USA
    Posts
    422
    Thanks
    8
    Thanked 6 Times in 6 Posts
    Quote Originally Posted by Arbitrator View Post
    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!
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •