css – Secondary Menu Not Functioning as a Sticky Menu
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top
Asked
Viewed
2 times
here is my css code for attempting to get my 2nd menu sticky. Why won’t it stay sticky?
My site: computerservicestech.com
.site-content, .entry-content, .entry-content p:first-of-type {
margin-top: 0;
}
.entry-header {
margin-bottom: 0;
}
#main-right{
background-color: #006ee6 !important;
}
#footer-info{float:none !important;text-align:center !important;}
.get-started {border-radius: 0px;}
.get-started a {color: #fff!important;}
li.get-started.main-left {
background-color: #8B0000;
font-weight: 700;
text-transform: uppercase;
text-align: center;
padding: 10px 11px 10px 10px!important;
border-radius: 3px;
-moz-transition: all 0.5s;
-webkit-transition: all 0.5s;
transition: all 0.5s;}
li.get-started.main-left:hover {background-color:#800000 !important;}
li.get-started.main-middle {
background-color: #ff8c3c;
font-weight: 700;
text-transform: uppercase;
text-align: center;
padding: 10px 11px 10px 10px!important;
border-radius: 3px;
-moz-transition: all 0.5s;
-webkit-transition: all 0.5s;
transition: all 0.5s;}
li.get-started:hover {background-color:#c96310;}
li.get-started.main-right {
background-color: #3d8c40;
font-weight: 700;
text-transform: uppercase;
text-align: center;
padding: 10px 11px 10px 10px!important;
border-radius: 3px;
-moz-transition: all 0.5s;
-webkit-transition: all 0.5s;
transition: all 0.5s;
position: fixed;
}
li.get-started.main-right:hover {background-color: #357a38;}
/* fixed header button text color */
.et-fixed-header #top-menu .get-started a {
color: #fff!important;
display: block;
align-items: center;
text-align: center;
}
.get-started li.current-menu-ancestor > a, .get-started li.current-menu-item > a {
color: #fff !important;}
@media only screen and (min-width: 980px) {
li.get-started {height: 40px;}
#logo {
padding-left: 11.7vw;
margin-left: auto;
margin-right: auto;
margin-top: 4vh;
}
#top-header {
top: 10.38vh !important;
margin-right: auto;
margin-left: auto;
padding-right: 15.55vw;
z-index: 99999 !important;
padding-bottom: 2vh;
}
#main-header {
top: 0px !important;
padding-top: 1.0vh;
padding-bottom: 8.2vh !important;
padding-right: 13.55vw;
z-index: 1;}
}
@media (min-width: 981px) and (max-width: 1129px) {
#logo{
padding-left: 5vw;
}
}
@media (min-width: 981px) and (max-width: 1350px) {
.container {
width: 95% !important;
}}
.dnld .et_contact_bottom_container{float: none !important;
margin-top: -1.5%;
text-align: center !important;}
@media only screen and (min-width: 756px) {
div#page-container {
padding-top: 150px!important;
margin-top: -1px;
}}
#top-header, #top-header #et-info, #top-header .container, #top-header .et-social-icon a {
line-height: 1em;
background-color: #fff0!important;
}
#top-header .container {
padding-top: 2.5em;
font-weight: 600;
}
Collin1312 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
lang-css

Leave an answer