So I only want the tooltip to show when I click on the input field, but unfortunately, it doesn't appear at all... Here is my CSS / HTML:
.tooltip {
color: rgb(143, 143, 143);
font-size: 14px;
font-family: Arial;
padding-left: 24px;
padding-right: 24px;
padding-top: 15px;
padding-bottom: 60px;
background-color: black;
box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
position: absolute;
visibility: hidden;
border-radius: 5px;
bottom: -86px;
}
.search_twitter:focus .tooltip {
visibility: visible;
}
<div class="t_header_right">
<input type="text" placeholder="Search Twitter" class="search_twitter">
<img src="thumbnails/svgexport-29.svg" class="search_icon">
<div class="tooltip">
Try searching for people, topics, or keywords
</div>
</div>
EDIT: So I realized it's most likely because the input box is not a parent of the tooltip, therefore, it can't use the CSS. Well, how do I make the input field a parent?