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 2 of 2
  1. #1
    New Coder
    Join Date
    Oct 2010
    Location
    PA
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts

    How do you hide elements from a namespace?

    This seems like a simple task but I can't figure it out. I have a CSS stylesheet with 4 different xml namespace declarations at the top. I want to hide all of the selectors in the stylesheet from 2 of the declared namespaces. I was given a hint that I could use the display:none rule to achieve this but I can't figure out how to do it. I tried using the namespace prefix on each selector like this prefix|selector {display:none} but that doesn't seem to work.

    Thanks for any help!

  • #2
    New Coder
    Join Date
    Oct 2010
    Location
    PA
    Posts
    11
    Thanks
    2
    Thanked 0 Times in 0 Posts
    I'm going to answer my own question here since I just figured it out. I was on the right track by coding prefix|selector {display:none} but then I figured out that I could just knock out all selectors using the wildcard like this:

    prefix1|* {display: none}
    prefix2|* {display: none}


    I also had a syntax error in my CSS that was causing the content that I was looking for on my page to not display. I had commas in between the selectors on rules that had more than one selector like this:

    selector, selector {declarations}

    Should be:

    selector selector {declarations}

    Problem resolved!


  •  

    Posting Permissions

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