I am facing problem in providing color to text in label widget using css code .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I am facing problem in providing color to text in label widget using css code .
I am facing problem in providing color to text in label widget using CSS code .i WILL PROVIDE THE CODE BELOW :
.simple-label {
width: auto;
height: auto;
display: flex;
color: red;
font-weight: 400;
line-height: 14px;
}
- Labels:
-
Best Practices
-
Design
-
Mashup-Widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello,
Why don't you use Style property of the widget instead? If you reuse your Style objects consistently, it will be more flexible and easier to maintain in the long-run.
/ Constantine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I want to try it using CSS code.Please give me some suggestions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
This will work (change CSS class in label widget):
.label-text {
width: auto;
height: auto;
display: flex;
color: red;
font-weight: 400;
line-height: 14px;
}
Best regards,
Raluca Edu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
No .it did not work if i change the css class too
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
In 8.4.4 worked, what version are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
8.4 version
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Please attach xml export of simple mashup to look into.
Thanks,
Raluca Edu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@sanjanabalaji In your original example, add ".label-text" to the CSS selector like that:
.simple-label .label-text { width: auto; height: auto; display: flex; color: red; font-weight: 400; line-height: 14px; }
The custom CSS class is applied to the DIV, which encloses the SPAN with "label-text" (not to the SPAN itself), so you need to specify an explicit CSS selector to override "label-text" parameters (dark-gray color, bold, etc.)
/ Constantine
