TeamDesk Knowledge Base & Support

   Home      FAQ      Forum      Idea Exchange      Ask a Question      My Stuff      Help   
  
Colorised text options
As an addition to the color highlighting of text (or rather, its background) dependant on assigned values, it would be nice to choose the following:
- border color (if this is selected, the background becomes transparent)
- text color
- width and height of background/border

Here's what I use now, with css:
/*TEXT WITH COLOUR*/
span.td-mark{
border-radius: 2px!important;
min-height: 18px;
width: 100%;
text-align: center;
/* padding-top: 10px !important; */
margin-left: -2px!important;
color: #fff!important;
opacity: 0.8;
}
I've played around with adding the border but the color is then hardwired (doesn't change on text's value change)...

I feel the in some instances, the look of a bordered highlighted text may be softer on the end users eye's
ID
1977
Category
Setup
Author

basenine
Date Created
4/20/2023 6:43:50 PM
Date Updated
4/20/2023 7:42:13 PM
Status
New Idea
Score
60
Promoted By
Nathan MackLuison LassalaNick Kemp
Patricio Bustoscooper collier basenine
Comments
cooper collier  4/20/2023 7:33:16 PM
It would be nice to be able to do it on the level you are asking so I agree.

In the meantime. I have been able to do it using xhtml column and inline css
I do this with the background color all the time. Here is an example.

<div style=" <%If([# Civil Engineering]<1,"background-color:mistyrose","background-color:green")%> ">
Civil Engineering
</div>

I will try to explain below.
The way to keep the syntax clear and not mess up the code punctuation you should writing your xhtml like this.

First type <div style=" ">
yes leave all those spaces in now

Next put in the escape tags like this. We call them escape tags, because what you put between them is no longer xhtml code, it is now teamdesk formula code.

<div style=" <% %> ">

Save this.

Then in the middle add the Teamdesk formula code that will write the CSS tag as text.


<div style=" <% If([# Civil Engineering]<1,"background-color:mistyrose","background-color:green") %> ">

This says, if my column is greater than 1 write background-color:mistyrose otherwise background-color:green

When I first started messing with inline CSS and formula, I found it less confusing to leave all the spaces in and to put the entire tag into the formula like above . Once you get used to it, you can make it shorter by only adding the changeable tag value to the formula section and removing spaces.
<div style="background-color:<%If([# Civil Engineering]<1,"mistyrose","lightgreen")%>">


NOTE: The teamdesk formula error checker does not work well for this. You will not hurt anything by doing the above, but if your xHTML column does not display as you think it should, you will need to carefully check every comma and quote very carefully.
basenine 4/20/2023 7:42:13 PM
Thank you Cooper
Feedback
 
Back to Search Results