How to center a menu using CSS and changing the menu opacity
-
I need help centering my menu on my webpage. I have tried several different methods but none solved the problem correctly. I thought maybe if I gave the direct coding, someone could see what I needed to add to solve the problem.
Website: https://www.curlswithattitude.com.menu-bar { display:inline-block; width: 100%; margin: 0px 0px 0px 0px; padding: 6px 6px 6px 6px; height: 60px; line-height: 100%; border-radius: 0px; -webkit-border-radius: 0px; -moz-border-radius: 0px; box-shadow: 1px 1px 1px #000000; -webkit-box-shadow: 0px 0px 0px #000000; -moz-box-shadow: 0px 0px 0px #000000; background: #FFF; border: solid 1px #FFFFFF; text-align: center; z-index:999; position: relative; opacity: 1; } .menu-bar li { margin: 0px 0px 6px 0px; padding: 5px 5px 5px 5px; float: left; position: relative; list-style: none; } .menu-bar a { font-weight: bold; font-family: "Montserrat", sans-serif; font-style: normal; font-size: 13px; color: #000000; text-decoration: none; display: block; padding: 10px 20px 10px 20px; margin: 0; margin-bottom: 6px; border-radius: 10px; -webkit-border-radius: 10px; -moz-border-radius: 10px; text-shadow: 0px 0px 0px #000000; text-transform: uppercase; text-align: right; } .menu-bar li ul li a { margin: 0; } .menu-bar :active, .menu-bar li:hover > a { background: #acacac; color: #FFFFFF -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .2); -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .2); box-shadow: 0 1px 1px rgba(0, 0, 0, .2); text-shadow: 0px 0px 0px #000000; } .menu-bar ul li:hover a, .menu-bar li:hover li a { background: none; border: none; color: #666; -box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none; } .menu-bar ul a:hover { background: #acacac !important; color: #000000 !important; border-radius: 0px; -webkit-border-radius: 0; -moz-border-radius: 0; text-shadow: 0px 0px 0px #FFFFFF; } .menu-bar li:hover > ul { display: block; } .menu-bar ul { background: #FFFFFF; display: none; margin: 0; padding: 10px; width: 185px; position: absolute; top: 30px; left: 0; border: solid 1px #B4B4B4; border-radius: 10px; -webkit-border-radius: 10px; -moz-border-radius: 10px; -webkit-box-shadow: 0px 0px 0px #222222; -moz-box-shadow: 0px 0px 0px #222222; box-shadow: 0px 0px 0px #222222; } .menu-bar ul li { float: none; margin: 0; padding: 0px; } .menu-bar ul a { padding:8px 0px 8px 15px; color:#000000 !important; font-size:13px; font-style:normal; font-family:"Montserrat", sans-serif; font-weight: normal; text-align:left; text-shadow: 0px 0px 0px #FFFFFF; text-transform: uppercase; } .menu-bar ul li:first-child > a { border-top-left-radius: 10px; -webkit-border-top-left-radius: 10px; -moz-border-radius-topleft: 10px; border-top-right-radius: 10px; -webkit-border-top-right-radius: 10px; -moz-border-radius-topright: 10px; } .menu-bar ul li:last-child > a { border-bottom-left-radius: 10px; -webkit-border-bottom-left-radius: 10px; -moz-border-radius-bottomleft: 10px; border-bottom-right-radius: 10px; -webkit-border-bottom-right-radius: 10px; -moz-border-radius-bottomright: 10px; } .menu-bar:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0; } .menu-bar { display: inline-block; } html[xmlns] .menu-bar { display: block; } * html .menu-bar { height: 1%; }
And also, how can I change the opacity of the menu? I don’t want it to be completely transparent but a little see-through?
Thanks!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘How to center a menu using CSS and changing the menu opacity’ is closed to new replies.