Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

181
Views
How to hide <h3> in div tags with css

I'm trying to hide this div's h3 tag without adding a class. I have tried in various ways with the css but I have not succeeded. Can anyone recommend me an alternative?

Since the html code is in a plugin file I cannot act on it directly.

<div class="wpua-edit-container">
<h3>Profile Picture</h3>
</div>
7 months ago · Santiago Trujillo
2 answers
Answer question

0

Is this what you want?

div h3 {display:none}
<div class="wpua-edit-container">
<h3>Profile Picture</h3>
<p>hello...</p>
</div>

Also, you may do:

  1. div h3 {display:none;}
  2. div.wpua-edit-container h3 {display:none;}
  3. .wpua-edit-container h3 {display:none;}
  4. .wpua-edit-container > h3 {display:none;}
  5. div.wpua-edit-container > h3 {display:none;}

All, of these should work. Additionally, add !important if required, if your plugin is still not removing it, like {display: none!important}.

7 months ago · Santiago Trujillo Report

0

You can use jQuery if you want:

here's the index.html

<html>
    <head>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
        <script src="script.js"></script>
    </head>
    <body>
        <div class="wpua-edit-container">
            <h3>Profile Picture</h3>
        </div>
    </body>
</html>

and the script.js:

$(document).ready(function() {
    $("h3").hide()
})

It's basically doing the same thing as display: none; (it adds to the element the display: none style property to the element) but using jQuery.

7 months ago · Santiago Trujillo Report
Answer question
Find remote jobs