Calendar color coding formula help

  • 1
  • 3
  • Question
  • Updated 2 years ago
  • Answered
When adding this formula to my calendar, it is adding an empty space above my text. It is coloring the data correctly, but the extra line is making it unusable.

If([Project Owner]="Larry","<div style=background-color:#f6ff00;\">" &"<b>" &[Planned Project]&"",
[Project Owner]="Sam","<div style=background-color:#03aff9;\">" &"<b>" &[Planned Project]&"",
[Project Owner]="Joe","<div style=background-color:#f90404;\">" &"<b>" &[Planned Project])


This is what it looks like when displaying:




As you can see each entry has a blank one above it. This is what it looks like if I don't use my formula, and only put in the [Planned Project]. This doesn't have the excellent color coding, but the information is all on one row as it should be... Any help would be much appreciated!

Photo of Shane

Shane

  • 100 Points 100 badge 2x thumb

Posted 2 years ago

  • 1
  • 3
Photo of Chris

Chris, Champion

  • 4,390 Points 4k badge 2x thumb
Venturing a guess without experimenting, but I wonder if you close your <b> tags if that might help?
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
also venturing a guess without time to test, but try adding some type of padding element to the div

padding:7px;
Photo of Shane

Shane

  • 100 Points 100 badge 2x thumb
I tried both of those suggestions, it still doesn't seem to help. Now that I am thinking it through, I am wondering if it can't color since the events go across multiple dates??? Has anyone created a calendar that could color code different events across multiple days or weeks? For instance, if we wanted to say that the Mothers day banner will be on a website from 4-15 to 5-14, but we would have multiple other one day launches or specials color coded differently on single days. I thought my formula would handle that, but I'm not sure if the calendar functionality can display it the way I am needing it to.
Photo of Matthew Neil

Matthew Neil

  • 31,378 Points 20k badge 2x thumb
Native QB calendar is pretty rough,  Its too bad they haven't made a better solution.
Photo of Shane

Shane

  • 100 Points 100 badge 2x thumb
[SOLVED]!!!! After reading up on a few other questions, I replaced "div style" with "span style" in my formula, and it worked!!! It still won't allow coloring across multiple days, but it did remove the spaces and the extra line. 

Thank you all for the help and suggestions.