It is a wordpress site and this is from my style.css :
.sf-menu, .sf-menu * { margin: 0; padding: 0; list-style: none; }
.sf-menu li { position: relative }
.sf-menu ul { position: absolute; display: none; top: 100%; left: 0; z-index: 99; }
.sf-menu > li { float: left }
.sf-menu li:hover > ul, .sf-menu li.sfHover > ul { display: block }
.sf-menu a { display: block; position: relative; }
.sf-menu ul ul { top: 0; left: 100%; }
.sf-arrows .sf-with-ul:after { content: "\f347"; display: inline-block; -webkit-font-smoothing: antialiased; font: normal 12px/16px 'dashicons'; vertical-align: top; margin: 5px 0px 0 4px; }
.sf-arrows ul .sf-with-ul:after { content: "\f345"; display: inline-block; -webkit-font-smoothing: antialiased; font: normal 12px/22px 'dashicons'; float: right; vertical-align: top; margin: 2px 0 0 4px; }
.sf-arrows ul li > .sf-with-ul:focus:after, .sf-arrows ul li:hover > .sf-with-ul:after, .sf-arrows ul .sfHover > .sf-with-ul:after { border-left-color: white }
.navbar-toggle { display: none; position: absolute; left: auto; top: 5px; padding: 14px 13px; border-radius: 2px; background: rgba(0, 0, 0, 0.33); }
.navbar-toggle .icon-bar { display: block; width: 25px; height: 2px; border-radius: 1px; background: #fff; }
.navbar-toggle .icon-bar + .icon-bar { margin-top: 4px }
the menu block on the site wont expand.(the menu block only appears when page is in moblie-view mode.)
how should i fix this ?
in this cases make sure you have installed the theme correctly.
that was the mistake i've made.
I have a side bar called column left. for some reason it does not go the full height of page when I have extra panels on view.
I use bootstrap with it as well with a fixed navbar at top.
Question: Why is it side bar "column left" not going full height what every page size is. What would be the best solution to solve it?
Codepen preview
Code View http://codepen.io/riwakawebsitedesigns/pen/bdaGro/
Full View http://codepen.io/riwakawebsitedesigns/full/bdaGro/
#import url(//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&subset=latin,cyrillic-ext,greek-ext,vietnamese);
/* Global */
body {
/*height: 100%;*/
margin: 0;
/*min-height: 100% !important;*/
font-family: 'Open Sans', sans-serif;
overflow-x: hidden;
padding-top: 70px;
width: 100%;
}
#user-bar-chart {
height: 300px;
}
#client-bar-chart {
height: 300px;
}
a,
a:hover,
a:focus {
cursor: pointer;
text-decoration: none;
}
tr:hover a.dashboard-user:after {
font-family: FontAwesome;
content: "\f044";
font-size: 14px;
}
/* fix for bootstrap hidden and visible */
span.hidden-xs, span.hidden-sm, span.hidden-md, span.hidden-lg {
display: inline;
}
/* Layout */
.container-fluid {
padding-left: 20px;
padding-right: 20px;
}
#content {
padding-bottom: 40px;
transition: all 0.3s;
}
/* Column Left */
#column-left {
width: 50px;
min-height: 100% !important;
background-color: #515151;
position: absolute;
top: 0px;
padding-top: 100px;
z-index: 10;
transition: all 0.3s;
}
#column-left + #content {
margin-left: 50px;
}
#column-left + #content + #footer {
margin-left: 50px;
}
#media (max-width: 767px) {
#column-left {
overflow: hidden;
display: none;
}
#column-left + #content {
margin-left: 0;
}
#column-left + #content + #footer {
margin-left: 0;
}
}
/* Column Left Active */
#column-left.active {
width: 235px;
display: block;
}
#media (min-width: 768px) {
#column-left.active {
overflow: auto;
}
#column-left.active + #content {
margin-left: 235px;
}
#column-left.active + #content + #footer {
margin-left: 235px;
}
}
#media (max-width: 767px) {
#column-left.active + #content {
position: relative;
left: 235px;
}
#column-left.active + #content + #footer {
position: relative;
left: 235px;
}
}
#column-left.active {
width: 235px;
}
#column-left.active #menu li i {
font-size: 14px;
}
#column-left.active #menu > li > a > span {
display: inline;
}
#column-left.active #menu > li > ul {
position: relative;
left: auto;
top: auto;
width: auto;
visibility: visible;
}
/* Top Navbar */
.menu {
background: #eeeeee none repeat scroll 0 0;
}
.navbar {
background-color: #fff !important;
border: 0 none;
border-radius: 0;
color: #666;
margin-bottom: 0;
}
.navbar.navbar-shadow {
box-shadow: 0 1px 0 0 rgba(0, 0, 0, 0.08), 0 2px 0 0 rgba(0, 0, 0, 0.02);
}
#button-menu {
display: inline-block;
cursor: pointer;
color: #6D6D6D;
}
#media (max-width: 640px) {
.navbar-brand {
font-size: 14px;
padding: 15px 7px;
}
}
/* Sidebar Menu */
#menu,
#menu ul,
#menu li {
padding: 0;
margin: 0;
min-height: 100%;
list-style: none;
}
#menu {
margin-bottom: 25px;
}
#menu > li {
position: relative;
}
#menu li a {
text-decoration: none;
display: block;
padding: 10px;
cursor: pointer;
border-bottom: 1px solid #515151;
}
#menu li a i {
font-size: 16px;
}
#menu > li > a {
color: #C4C4C4;
font-size: 14px;
padding-left: 13px;
border-bottom: 1px solid #585858;
}
#menu > li > a:hover {
background-color: #444444;
}
#menu > li > a > span {
display: none;
margin-left: 8px;
}
#menu li li a {
color: #9d9d9d;
}
#menu li li a:hover {
color: #FFFFFF;
background-color: #373737;
}
#menu li li a:before {
content: "\f101";
font-size: 14px;
font-family: FontAwesome;
margin-left: 10px;
margin-right: 10px;
transition: margin ease 0.5s;
}
#menu li li a:hover:before {
margin-right: 20px;
}
#menu > li.active > a {
color: #DDDDDD;
background: #373737;
}
#menu li.active li a {
color: #C4C4C4;
}
#menu li li.active > a:last-child {
color: #FFFFFF;
}
#menu li li.active a:last-child:before {
margin-left: 20px;
margin-right: 10px;
}
#menu > li > ul {
position: absolute;
left: 50px;
top: 0px;
width: 210px;
background-color: #444444;
visibility: hidden;
}
#menu li ul {
overflow: hidden;
}
#menu > li:hover > ul {
visibility: visible;
}
#menu li li a.parent:after, #column-left.active #menu > li a.parent:after {
font-family: FontAwesome;
content: "\f105";
float: right;
margin-right: 8px;
}
#menu li li.open > a.parent:after, #column-left.active #menu > li.open > a.parent:after {
font-family: FontAwesome;
content: "\f107";
float: right;
margin-right: 8px;
}
#menu li ul a {
padding-left: 20px;
}
#menu li li ul a {
padding-left: 40px;
}
#menu li li li ul a {
padding-left: 60px;
}
#menu li li li li ul a {
padding-left: 80px;
}
/* Panels */
.panel {
border-radius: 0px;
}
.panel .panel-heading {
position: relative;
}
.panel-heading h3 i {
margin-right: 8px;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
.panel-heading i {
font-size: 16px;
font-weight: 500;
}
.panel-heading h3 {
font-size: 16px;
font-weight: 500;
display: inline-block;
}
/* Primary Panel */
.panel-primary {
border: 1px solid #c3e4f6;
border-top: 2px solid #5cb7e7;
}
.panel-primary .panel-heading {
color: #1e91cf;
border-color: #96d0f0;
background: white;
}
/* Default Panel */
.panel-default {
border: 1px solid #e8e8e8;
border-top: 2px solid #bfbfbf;
}
.panel-default .panel-heading {
color: #595959;
border-color: #e8e8e8;
background: #fcfcfc;
}
/* Info Panel */
.panel-info {
border: 1px solid #e8e8e8;
border-top: 2px solid #3c8dbc;
}
.panel-info .panel-heading {
color: #595959;
border-color: #e8e8e8;
background: #fcfcfc;
}
I believe that adding 'position:fixed;' to your #column-left should do the trick.
In that case no matter how large/long your content is, the sidebar will always remain at 100% height of viewport, fixed at the left side of the screen.
div#column-left {
width: 50px;
min-height: 100% !important;
background-color: #515151;
position: fixed;
top: 0px;
padding-top: 100px;
z-index: 10;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
Set your body as position: relative if you want your left column to take the full height of your page. I would also explicitely set your column to take full height by removing your min-height and setting top: 0; bottom:0; on your column:
body {
margin: 0;
font-family: 'Open Sans', sans-serif;
overflow-x: hidden;
padding-top: 70px;
width: 100%;
position: relative;
}
#column-left {
width: 50px;
background-color: #515151;
position: absolute;
top: 0px;
bottom: 0px;
padding-top: 100px;
z-index: 10;
-webkit-transition: all 0.3s;
transition: all 0.3s;
}
It is actually 100% of the height of the viewport. (Not 100% of the page length).
What you can do:
#column-left { position: fixed; }
use display: table-cell on #column-left and #content
use flexbox (depending on if you have to support old browsers)
I'm not sure if it matters that it follows when you scroll the page, but you could make it position:fixed.
Perhaps that's an easy fix for you
I am looking to use navigation pills on my website, but they are resulting in a background leak. See the effect on this website: http://oleb.net/blog/2011/12/tutorial-how-to-sort-and-group-uitableview-by-date/. Hover over the pills multiple times to see the issue. You can see the outline of the pills appear.
Here is the code that I tried:
.navigation-main {
border-top: 1px solid rgba(0,0,0,0.1);
padding-top: 5px;
clear: both;
display: block;
font: 700 13px/1.3076923076 Lato, sans-serif;
letter-spacing: .05em;
text-transform: uppercase;
width: 100%;
}
.navigation-main .menu {
max-width: 1272px;
margin: 0 auto;
}
.navigation-main ul {
list-style: none;
margin: 0;
padding-left: 0;
text-align: center;
}
.navigation-main li {
display: inline-block;
position: relative;
width: 100px;
}
.navigation-main li:after {
content: none;
display: block;
font-size: 11px;
margin-top: -4px;
vertical-align: middle;
}
.navigation-main li:last-child:after {
content: none;
}
.navigation-main a {
display: block;
line-height: 2.6153846153;
padding: 0 10px;
text-decoration: none;
white-space: nowrap;
}
.navigation-main ul ul {
background-color: #000;
display: none;
float: left;
position: absolute;
top: 2.6153846153em;
left: 0;
text-align: left;
z-index: 99999;
}
.navigation-main li li {
display: block;
}
.navigation-main li li:after {
content: "";
display: block;
margin: 0;
}
.navigation-main ul ul ul {
left: 100%;
top: 0;
}
.navigation-main ul ul a {
color: #fff;
line-height: 1.3076923076;
padding: .6153846153em 10px .6923076923em;
white-space: normal;
width: 170px;
}
.navigation-main ul ul a:hover {
background-color: #333;
color: #fff;
}
.navigation-main ul li:hover > ul {
display: block;
}
/* This is where the pill happens */
.navigation-main a:hover,
.navigation-main li.current_page_item > a,
.navigation-main li.current-menu-item > a {
border-radius: 4px;
color: #FFFFFF;
background-color: #000;
}
How do I stop the outline from appearing? Thanks!
Edit:
Code tried:
.navigation-main li {
display: inline-block;
position: relative;
border-radius: 6px;
width: 100px;
.navigation-main a:hover,
.navigation-main li.current_page_item > a,
.navigation-main li.current-menu-item > a {
border-radius: 4px;
color: #FFFFFF;
background-color: #000;
background-clip: padding-box;
}
Try adding this to your css:
background-clip: padding-box;
Add it to any item using border-radius.
Here is exactly what you need to write change for your example. Tried and verified.
body > header nav li a:hover {
color: white;
background-color: #0a6abf;
background-clip: padding-box;
}
with background-clip
without background-clip
I am working on horizontal menu bar and I’ve used following line code. It is working fine in all browsers:
but when I’m testing it on IE7 & 8 then sub menu not opening.
When I removed the shadow from navMenu bar then sub menu items will be visible.
Html Code:
<div id="navMenu">
<div id="menuContainer">
<ul id="coolMenu">
<li>Menu1</li>
<li>Menu2</li>
<li>Menu3 </li>
<li>Menu4
<ul>
<li>Menu5</li>
<li>Menu6</li>
<li>Menu7</li>
</ul>
</li>
</ul>
</div>
</div>
CSS Code:
#navMenu
{
height: 40px;
line-height: 40px;
background-color: #dcdcdc;
position: relative;
z-index: 40000 !important;
margin-left: auto;
margin-right: auto;
min-width: 100%;
overflow:visible;
}
#menuContainer
{
padding: 0px;
text-align: left;
width: 1200px;
margin: 0px auto;
z-index: 40000 !important;
overflow:visible;
}
#coolMenu, #coolMenu ul
{
padding: 0px;
text-align: left;
list-style: none;
list-style-type: none; /* ie6*/
}
#coolMenu > li
{
float: left;
z-index: 40000 !important;
display: block; /* ie6*/
}
#coolMenu li a
{
display: block;
height: 40px;
line-height: 40px;
padding-left: 15px;
padding-right: 15px;
text-decoration: none;
z-index: 40000 !important;
display: block; /* ie6*/
filter:alpha(opacity=90);
}
#coolMenu ul
{
position: absolute;
display: none;
z-index: 40000 !important; /* arun */
}
#coolMenu li:hover ul
{
display: block;
}
/* Main menu
------------------------------------------*/
#coolMenu
{
margin: 0px;
float: left;
font-family: TradeGothic;
font-style: oblique;
font-size: 11.25px;
color: #474747;
background: #dcdcdc;
z-index: 40000 !important;
}
#coolMenu > li > a
{
color: #474747;
}
#coolMenu > li:hover > a
{
background: #d21c1c;
color: #fff;
z-index: 40000 !important; /* arun */
}
/* dropdown */
#coolMenu li:hover > ul {
display: block;
}
/* Submenu
------------------------------------------*/
#coolMenu ul
{
background: #d21c1c;
z-index: 40000 !important;
}
#coolMenu ul li a
{
/*z-index: 20 !important;*/
color: #fff;
z-index: 40000 !important;
}
#coolMenu ul li:hover a
{
background: red;
z-index: 40000 !important;
}
ul is take by default margin. so
#coolMenu ul{margin:0;}
Solve your problem in ie7
I have added a nav menu background to my style sheet , and i found that when i zoom my browser , the menu it self dont resize like the the rest of my theme , its take another positions away from the theme structure...thats my nav css code :
#main-menu {
margin-left:184px;
width: 978px;
height: 56px;
background: url(images/nav_bg.png);
z-index: 1;
position: relative;
}
#main-menu ul {
background: url(images/nav_bg.png);
margin: 0;
height: 56px;
}
#main-menu ul li {
background: url(images/navh_bg.png);
float: left;
height: 56px;
position: relative;
margin-right: 25px;
}
#main-menu ul li:last-child,
#main-menu ul li.last {
margin-right: 0;
}
#main-menu ul li a {
font-size: 13px;
height:56px;
line-height: 56px;
vertical-align: middle;
float: left;
font-weight: bold;
padding: 0 4px;
color: #4C4C4C;
}
#main-menu ul li:hover {
background: url(images/navh_bg.PNG) no-repeat scroll center bottom transparent;
visibility: inherit;
color: #ffffff;
/* fixes IE7 'sticky bug' */
}
#main-menu ul li a:hover {
background: url(images/navh_bg.PNG)no-repeat scroll center bottom transparent;
text-decoration: none;
visibility: inherit;
color: #ffffff;
}
you can use in all widths, margin and fontsize (%)
#main-menu {
margin-left: 10%;
width: 90%;
height: 56px;
background: url(images/nav_bg.png);
z-index: 1;
position: relative;
font-size: 100%
}