Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

223
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda