This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Set filter to layout PC Visu
#1
Hi.

I want to set a filter for one specific layout with the ID 1. I did'nt manage to do this in CSS, but I did manage to set every backgroud to my filter with this

Code:
/* Set style on every element*/
[style*="background-image"] {
  filter: grayscale(80%) brightness(50%) !important;
}

and but this on every widget that I dont want this filter to follow
Code:
/* reset style for widget with data-widget-id="35" */
#widget-35 {
  filter: none !important;

But I have to this on every widget and it gets a little anoying Smile

How can I put this filter on only Layout ID 1?
Reply
#2
Modify the second rule like this:
Code:
.layer-widget {
  filter: none !important;
}
Reply
#3
I use this thread for diffrent but simular situation.

Try to set a text with specific CSS role via additional classes like this:
Code:
.longtextkWhScreen {
  width: 250px;
  white-space: normal;
  text-align: center;
}
Width is working great but the text-align keeps to the left whatever I type here, something I miss?
Reply
#4
You can try adding !important to override certain CSS rules. Keep in mind that it will only work in the view mode, not in the editor.
Code:
text-align: center !important;
Reply
#5
(12.06.2023, 08:50)admin Wrote: You can try adding !important to override certain CSS rules. Keep in mind that it will only work in the view mode, not in the editor.
Code:
text-align: center !important;

Yes tried that but no success
Reply
#6
Values are center-aligned by default so such rule is not needed at all unless you have overridden the default rule somewhere else.
Reply
#7
I took away every CSS line but that one but still same result. Is there some relative becasue its 250Byte String value?
Reply
#8
If the string is longer than the set element width it will be aligned to the left.
Reply
#9
(12.06.2023, 13:28)admin Wrote: If the string is longer than the set element width it will be aligned to the left.

Yes thanks I noticed that as well. Saw that the value background was align center but the text string was too long,
Fixed now Smile Thanks!
Reply


Forum Jump: