I'm building a menu on a SharePoint site page and I'm having difficulties with the CSS. Everything works well outside of SharePoint, but for some reason I'm not able to override the box-shadow
and the font color
.
I tried using the !important
in my CSS rules. I tried using !important
in CSS inline-style
.dropdown-content {
display: none;
list-style-type: none;
position: absolute;
background-color: #f9f9f9;
min-width: 220px;
color: #000000;
text-align: left;
margin-left: -4.7em;
margin-top: 0.89em;
box-shadow: 5px 5px 11px #dadada !important;
}
inline : <div class = "dropdown-content" style = "box-shadow: 5px 5px 11px #dadada !important;">
here is my code for the text in the menu
<li class = "li-drop" style="color:#000000# !important;"><a href="url" onclick="return go(this);">Text</a></li>
for some reason, the box-shadow
and the font color in the <a>
refuse to follow.
Anyone can help me figure this out?
!important
. Have you tried adding selectors to increase the specificity of your styles? Also, have you investigated what selectors SharePoint is using that causes your styles to be ignored? You might be able to use exactly those to create a rule that has more specificity and thus override the SharePoint style.box-shadow
will not work. The font color for<a>
is already forced with a!important
in the master CSS change and can't be changed for business reasons. I will create a box shadow effect by overlapping 2<div>
.