how to not render an element in HTML

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • naveen kuamr
    New Member
    • May 2013
    • 1

    how to not render an element in HTML

    Does the visibility as hidden renders the element? if no is there any way to not render a element in HTML using J Query or any other way.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    If by not rendering, you mean to take it out of the flow of the page, you can set the display property to "none":
    Code:
    style="display:none;"
    (or set the appropriate class)

    If that's not what you meant, can you please explain further with an example.

    Comment

    • shadowstrike
      New Member
      • Aug 2013
      • 21

      #3
      Say you are trying to hide a DOM element which is wrapped up in a id or class then you can just style the id/class with this code:
      Code:
       .yourclassname{
                  display:none;
      }
      or
      Code:
      #yourclassname{
                  display:none;
      }
      Hope this answers your question

      Comment

      • Nepomuk
        Recognized Expert Specialist
        • Aug 2007
        • 3111

        #4
        I'd suggest using "ninja" as the class name. So:
        Code:
        #ninja {
            display:none;
        }
        ;-)

        Comment

        Working...