#How do I color and format this square for an infobox?
1 messages · Page 1 of 1 (latest)
I can't immediately tell how your template is adding the "Yes" class to anything, and your css seems to depend on that class.
I don't think it is applied anywhere.
I'd probably do something like this...
a new class called "dicounted-{{{discntd|}}}", so when the value is "Yes" you can target the style .dicounted-Yes directly.
Just know that case matters in CSS.
(I used miraheze global user directory to find your username/site).
The following style also overrides the color:
color: black;
}```
As black is the default color, you shouldn't need to specify black, I'd think. Once I removed that, my version here worked.
You can use the MediaWiki magic word {{ucfirst:}} to convert the first character to a capital, regardless of what was entered. That way, "yes" or "Yes" will work, since "yes" will get converted to "Yes".
<td class="discounted-ask discounted-{{ucfirst:{{{discntd|}}}}}">{{{discntd|}}}</td>
Since relying on users to type things the way you want is always sketchy at best. 😆
Hello, @fickle beacon . Didn't noticed that my thread was getting messages until today. Sorry for not giving link the moment I created the post; I was waiting to get e response to send links. Also, was expecting that giving the wiki code and the css would be enough. I'm checking everything right now.
On the second picture, I tried to specify in there. It worked with the headers, but got surprised that here did not work.
"dicounted" or "discontinued"?
How this class works only by adding "dicounted-{{{discntd|}}}", been barely modified???
Also, been checking the template you created, at first instance I was unable to detect the changes, but finally, spotted them.
should I delete this?