- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 04:30 AM - edited 06-28-2024 04:33 AM
Hello All,
I want to change the Text color of Post button in RITM.
Please check the attached screenshot, at present the text color is Black but we want to change it to White.
It is OOTB Widget "Standard Ticket Actions" in our instance but in PDI the text color of the Post button is in white
Please check the HTML and CSS code in our instance.
HTML code with Post:
<form ng-submit="postEntry(data.journalEntry)" class="padding" id="sand">
<textarea ng-keypress="keyPress($event)" sn-resize-height="trim" rows="1" id="post-input"
<input type="submit" class="btn btn-primary post-btn" value="{{data.btnLabel}}" aria-label="{{data.btnLabel}}" ng-disabled="data.isPosting" ng-if="!data.read_only"/>
CSS code with Post:
min-width: 80px;
padding: 9px 15px;
color:white;
}
@Ankur Bawiskar @Dr Atul G- LNG @Mark Roethof @Community Alums
Thanks,
Sattar
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 05:02 AM - edited 06-28-2024 05:03 AM
Hi @sattar3 This kind of requirement there is no need customize/cloning a widget. You can just override CSS code in page specific CSS
.post-btn {
color: white !important;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 04:45 AM
Hi @sattar3 ,
The solution mentioned might help you : https://www.servicenow.com/community/developer-forum/how-to-change-text-color-on-csm-portal-widget/m...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 04:47 AM
Hi @sattar3 ,
Try using !important during setting the text color.
Updated CSS:
min-width: 80px;
padding: 9px 15px;
color:white !important;
}
Check for Overriding Styles
Inspect the button using the browser's Developer Tools to see if there are any other CSS rules overriding your styles. Look for the "Post" button and check the applied styles:
- Right-click on the "Post" button and select "Inspect" or "Inspect Element".
- In the Elements panel, look at the styles applied to the button.
- Ensure your .post-btn styles are being applied and not overridden by other styles.
Thanks,
Hope this helps.
If my response proves helpful please mark it helpful and accept it as solution to close this thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 05:03 AM
Hi @HrishabhKumar Thanks for the reply.
If i add the cloned widget with updated CSS it shows Send button instead Post and the color is White.
I checked in inspection, it shows like this
Can you please help me on this?
Thanks,
Sattar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2024 05:02 AM - edited 06-28-2024 05:03 AM
Hi @sattar3 This kind of requirement there is no need customize/cloning a widget. You can just override CSS code in page specific CSS
.post-btn {
color: white !important;
}