I recently created a sleek HTML transparent header bar using the following CSS:
#head-bar{
position:fixed;
top: 0px;
width:100%;
left:0px;
min-height:25%;
z-index:2;
background-color:#000;
background: rgba(0, 0, 0, 0.5);
}
Encountering the Problem:
However, I noticed that when certain browser toolbars are enabled, the height of this div decreases. The same issue occurs when tools like Firebug panel or Firefox's console are enabled. To tackle this problem, I attempted to dynamically set the height of the div using jQuery, but to no avail.
$(window).height() * 25 / 100; // unsuccessful attempt
If you have any insights on how I can maintain a fixed state for this div despite these challenges, I would greatly appreciate your guidance.