Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Alternatives to style="display:none"

I'm implementing a JSF component base where you must override the css being used or it will use its default css. I'm trying trying to hide the div and I've tried to set the rich-panelbar-header-act class style="display:none", but then it pulls in its default css. Is there any way to add a style attribute to rich-panelbar-header-act (since I have to implement the class) that hides the div? I've included my css and html below

CSS:

element.style { } Matched CSS Rules .rich-panelbar-header-act { background-image: url(/spot-main-web/a4j/g/3_3_3.Finalorg.richfaces.renderkit.html.GradientA/DATB/eAGLj48PDQ1lBAAJswIe.html); background-position: top left; background-repeat: repeat-x; vertical-align: middle; color: #FFF; background-color: #555; font-size: 11px; font-weight: bold; font-family: Arial,Verdana,sans-serif; } .rich-panelbar-header-act { border: 0 solid red; padding: 0 1px 1px 5px; cursor: pointer; } user agent stylesheetdiv { display: block; } Inherited from body.browserChrome.browserChrome2 body { font: 12px/17px Helvetica, Arial, Verdana; } 

HTML:

<html version="XHTML 2.0" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <head></head> <body> <div class="rich-panelbar rich-panelbar-b " id="j_id95" style="padding: 0px; height: 400px; width: 500px; none"> <div class="rich-panelbar rich-panelbar-interior " id="j_id96" style="none"><div class="rich-panelbar-header " style=";">Leverage the whole set of JSF benefits while working with AJAX</div><div class="rich-panelbar-header-act " style=";;;;display: none;">Leverage the whole set of JSF benefits while working with AJAX</div><div class="rich-panelbar-content-exterior" style="display: none; width: 100%;"><table cellpadding="0" cellspacing="0" style="height: 100%;" width="100%"><tbody><tr><td class="rich-panelbar-content " style=";">  Ajax4jsf is fully integrated into the JSF lifecycle. While other frameworks only  give you access to the managed bean facility, Ajax4jsf advantages the action and value  change listeners as well as invokes server-side validators and converters during the  AJAX request-response cycle.</td></tr></tbody></table></div></div> </div> </body> </html> 
like image 444
c12 Avatar asked Apr 06 '13 20:04

c12


People also ask

What can be use instead of display none?

All in the same code To provide a simpler, better answer, visibilty: hidden; would be an option, though if you need the space that element was inhabiting, display: none ! important; would be your best option.

What is the opposite of style display none?

opposite of 'none' is 'flex' while working with react native. Show activity on this post. visibility:hidden will hide the element but element is their with DOM. And in case of display:none it'll remove the element from the DOM.

Is hidden the same as display none?

display:none means that the tag in question will not appear on the page at all (although you can still interact with it through the dom). ... visibility:hidden means that unlike display:none , the tag is not visible, but space is allocated for it on the page.


1 Answers

width: 0; height: 0; 

or

visibility: hidden; 

or

opacity: 0; 

or

position: absolute; top: -9999px; left: -9999px; 

or just

display: none !important; 
like image 92
Kaloyan Avatar answered Oct 04 '22 07:10

Kaloyan