3

My question is quite simple. I'm using PrimeFaces 4.0 and the layout component.

The problem comes, when I try to adjust its CSS. I want to set its background to none, I tried the classic style="background: none !important but it ignores me, then I inspect the element in Google Chrome and saw that the .ui-widget-content style was the one which I wanted to hide then I try this:

<p:layout style="min-width:400px;min-height:1000px; .ui-widget-content {background: none !important;}">
<p:layoutUnit position="west" size="620" minSize="40" style=".ui-widget-content {background: none !important;}">

But it still doesn't work. Plus, in my css theme I have:

body .ui-widget-content {

    border-style: hidden;
    border-color: white;
    border-width: 0px;
    color: #4f4f4f;
}

If I add the background: none in there it does work, but screw up the theme of my whole application. Is there a way to hide the background for that single widget-content?

Tiny
  • 27,221
  • 105
  • 339
  • 599
Yayotrón
  • 1,759
  • 16
  • 27

1 Answers1

5

Don't fiddle around with style attribute. Just give it a class which you declare in a CSS file.

<p:layout styleClass="backgroundless">
.ui-layout-container.backgroundless .ui-widget-content {
    background: none;
}

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • Thanks a lot for your answer. That was exactly what I needed. I'm gonna check the css tutorial when I have a time, thanks again man! – Yayotrón May 18 '15 at 21:08