I made HTML Elements in php by echoing it; I wanted to change the css of that html, but it didn't work. I was wondering if you could do this?
The PHP
} else {
include("steamauth/SteamConfig.php");
include('steamauth/userInfo.php'); //To access the $steamprofile array
//Protected content
echo '<div class="dropdown">';
echo '<a class="dropdown-toggle" href="#">';
echo '<img src="'.$steamprofile['avatar'].'" height="30" style="border-radius: 100%;">';
echo '</a>';
echo '<div class="dropdown-content">';
echo '<a class="logout" href="'.$steamauth['logoutpage'].'"</a>';
echo '</div>';
echo '</div>';
}
The CSS
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
}
.dropdown-content a:hover {background-color: #f1f1f1}
.dropdown-toggle:hover .dropdown-content {
display: block;
}
.dropdown-toggle:hover .dropbtn {
background-color: #3e8e41;
}