I'm using a community visualisation in Google Data Studio (Templated Record) which allows me to use HTML and CSS to display records. I'm fairly new to all this and I'm having some trouble with what I want to achieve so hoping someone can help.
What I'm trying to do is be able to hide a Div element if it's inner
element is blank. All of the
elements I'm using are variables so I have no way of knowing if they'll be blank record from record.
Here's an example of of the HTML:
<div class="aDiv">
<h3>Study Summary:</h3><p> {{Summary}} </p></div><br>
Where is a fixed Header and
is the variable being pulled from a Google Sheet.
Here's the CSS:
.aDiv {border: 1px outset #193e72; padding: 0em 1em 2em;}
h3 {color: #193e72; font-size: 1.7em; margin: 0; padding-top: 0.5em;}
p {font-size: 1.3em}
Here's how it currently looks:
So basically I'd like to hide this entire element if the
variable is blank.
Any help with this would be much appreciated.