Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

211
Views
How can I hide a Div element if an inner <p> element is blank?

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:

screenshot of Div element

So basically I'd like to hide this entire element if the

variable is blank.

Any help with this would be much appreciated.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!