Bootstrap dropdown not appearing in IE9 - css

Currently I'm wordpressing a site that is using Bootstrap, and the .dropdown-menu is not appearing in IE8 (and, more importantly, IE9).
From my readings I discovered that there is a filter in navbar that causes this issue. Probably is neither the .navbar or the .dropdown class contain the filter. And I'm not even using the class .navbar, just .dropdown & dropdown-menu.
I would love some input on how to fix this. I'm using SCSS:
.header {
height:90px;
.brand {
height: 90px;
width: 246px;
background: url(../images/logo.png) no-repeat center;
display: block;
float: left;
}
nav {
padding-top:36px;
font-family:$tdSemibold;
ul, li {
padding: 0;
margin: 0;
list-style: none;
}
& > ul {
& > li {
display: inline-block;
margin-left:40px;
z-index: 9999;
& > a {
color: white;
text-transform: uppercase;
font-size: 16px;
letter-spacing:1px;
display:block;
height:30px;
& > span.caret {
display: none;
}
&:hover {
color: #85c1eb;
text-shadow: -1px -1px 0 #{darken(#85c1eb, 40%)};
}
}
&.dropdown:hover > .dropdown-menu {
background: #fff;
z-index: 9999;
display: inline-block;
}
}
}
.dropdown-menu {
background: #fff !important;
border-radius: 0;
#include boxShadow(0 0 5px rgba(0,0,0,.15));
&:before {
content: " ";
display: block;
position: absolute;
top: -5px;
left: 5px;
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid white;
z-index: 9999;
}
li {
border-bottom: 1px dashed #eee;
background: #fff;
z-index: 9999;
&:last-child {
border-bottom: none;
}
}
a {
padding: 8px 15px;
font-size: 14px;
color: $blue;
&:hover {
color:white;
}
}
}
}
}

Related

Centering the Nav Menu: Wordpress Hemingway Theme

I am still learning CSS, and don't know PhP, so I am probably missing something simple here.
Trying to center the nav menu (ul.blog-menu) and can't seem to figure it out. Have reviewed the other threads on this topic and so far none of it worked for me.
I am using the Hemingway Theme by Anders Noren. Menu is offset to the left-center
The site is http://www.fredwbaker.com/
Menu, offset to left, showing element in inspector
The relevant code section in the stylesheet is below. THANK YOU for your insight!
/* -------------------------------------------------------------------------------- */
/* 5. Navigation
/* -------------------------------------------------------------------------------- */
.mobile-menu {
display: none;
}
.blog-menu {
display: flex;
flex-wrap: wrap;
list-style: none;
margin: 0 0 0 -20px;
}
.blog-menu ul {
margin: 0;
}
.blog-menu li {
line-height: 1;
margin: 0;
position: relative;
}
.blog-menu > li + li:before {
color: #444;
content: "/";
display: block;
font-size: 16px;
line-height: 1;
margin: -9px 0 0 -3px;
position: absolute;
left: 0;
top: 50%;
z-index: 1000;
}
.blog-menu a {
display: block;
padding: 27px 20px;
text-transform: uppercase;
letter-spacing: 1px;
color: rgba( 255, 255, 255, 0.5 );
font-size: 13px;
}
.blog-menu a:hover,
.blog-menu .current-menu-item a {
color: #fff;
text-decoration: none;
}
.blog-menu > .menu-item-has-children a,
.blog-menu > .page_item_has_children a { padding-right: 35px; }
.blog-menu > .menu-item-has-children::after,
.blog-menu > .page_item_has_children::after {
content: "";
display: block;
border: 5px solid transparent;
border-top-color: rgba( 255, 255, 255, 0.5 );
position: absolute;
z-index: 1001;
right: 17px;
top: 50%;
margin-top: -2px;
transition: border-color .2s ease-in-out;
}
.blog-menu > .menu-item-has-children:hover::after,
.blog-menu > .page_item_has_children:hover::after { border-top-color: #fff; }
.blog-menu li:hover a {
background-color: #1d1d1d;
cursor: pointer;
}
.blog-menu li:hover > a { color: #fff; }
/* Sub Menus --------------------------------- */
.blog-menu ul {
position: inline-block;
display: none;
z-index: 999;
text-align: center;
}
.blog-menu ul li {
float: none;
display: block;
}
.blog-menu ul > .menu-item-has-children::after,
.blog-menu ul > .page_item_has_children::after {
content: "";
display: block;
border: 6px solid transparent;
border-left-color: rgba(255,255,255,0.4);
position: absolute;
z-index: 1001;
right: 10px;
top: 50%;
margin-top: -5px;
}
.blog-menu ul > .menu-item-has-children:hover::after,
.blog-menu ul > .page_item_has_children:hover::after { border-left-color: #fff; }
.blog-menu ul li {
width: 240px;
background: #1d1d1d;
}
.blog-menu ul a {
padding: 20px 0px;
margin: 0 20px;
line-height: 130%;
border-bottom: 1px solid rgba(255,255,255,0.1);
}
.blog-menu ul > li:last-child a { border-bottom-width: 0; }
.blog-menu li:hover > ul {
opacity: 1;
left: 0;
display: block;
}
/* Deep down --------------------------------------- */
.blog-menu ul li:hover > ul {
top: 0;
left: 240px;
margin-left: 0;
}
Without you sending a url to inspect from I can't say for sure this will work but because the blog menu is using flex, try adding justify-content:center. So:
.blog-menu {
display: flex;
justify-content: center;
flex-wrap: wrap;
list-style: none;
margin: 0 0 0 -20px;
}

Tabs Center Aligned in a WordPress Theme

Currently there are no options in the theme to align TABS centered. I tried to play with the CSS in the stylesheet (style.css), but with no luck.
how can I make the tabs center aligned?
/* tab */
.tab-set {
margin-bottom: 50px;
}
.tab-set ul.tabs-titles {
padding: 0;
height: 32px;
margin: 0;
clear: right;
}
.tab-set .tabs-titles li {
padding: 15px 35px;
color: #fff;
font-size: 16px;
font-weight: 800;
text-transform: uppercase;
border-right: 1px solid #f6f6f6;
float: left;
list-style-type: none;
cursor: pointer;
}
.tab-set .tabs-titles li:last-child {
border-right: none;
}
.tab-set .tabs-titles li.current {
padding: 15px 35px;
position: relative;
top: 1px;
color: #575a5c;
background: #f6f6f6;
}
.tab-set .tab-content {
padding: 20px 20px 10px;
background-color: #f6f6f6;
clear: both;
}
.tab-content p {
padding: 0;
}
.tab-set.white .tabs-titles li {
border-right: 1px solid #fff;
}
.tab-set.white .tabs-titles li.current {
background: #fff;
}
.tab-set.white .tab-content {
background-color: #fff;
}
It's a bit hard to guess the issue since there's no html to make sure the structure is correct. For sake of cleaner code, I'd do this and update the following:
.tab-set ul.tabs-titles {
padding: 0;
margin: 0;
width: 100%;
display: inline-block;
text-align: center;
}
.tab-set .tabs-titles li {
padding: 15px 35px;
color: #fff;
font-size: 16px;
font-weight: 800;
text-transform: uppercase;
border-right: 1px solid #f6f6f6;
display: inline-block;
}
.tab-set .tabs-titles li.current {
color: #575a5c;
background: #f6f6f6;
}
Try not ever set a fixed height unless needed because that's how items can look all messy. Have the padding/line-height dictate the height. I also removed some duplicates. For example, applying the same padding to .current was just doing the same thing. Hope this helps.
EDIT:
Here's my codepen to see it in action: https://codepen.io/thecenteno/pen/LYYgMpv

Custom breadcrumb css stretch issue

I've created a custom breadcrumb in jsfiddle http://jsfiddle.net/jimbodeni/Ata9k/ . When you shrink the width of the page the text is on 2 lines on the last 2 breadcrumbs but is only on one line on the first breadcrumb. This causes the grey background to be out of line on the first breadcrumb with the other 2.
How can I get this to always be the max height of the largest breadcrumb so they're all uniform height no matter if one has got one line of text and another 2 lines of text?
<div id="breadcrumb-container">
<ul class="breadcrumb">
<li>Surgery Started</li>
<li class="current">Surgery Started</li>
<li>Surgery Compl'd</li>
</ul>
</div>
div#breadcrumb-container {
width:100%;
}
div#breadcrumb-container li {
width: 33%;
}
div#breadcrumb-container li:last-child {
width: 34%;
}
.breadcrumb {
list-style: none;
overflow: hidden;
font: 13px Helvetica, Arial, Sans-Serif;
}
.breadcrumb li {
float: left;
background: #C7C7C7;
}
.breadcrumb li a {
color: white;
text-decoration: none;
padding: 5px 5px 5px 45px;
position: relative;
display: block;
}
.breadcrumb li a:after {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid #C7C7C7;
position: absolute;
top: 50%;
margin-top: -50px;
left: 100%;
z-index: 2;
}
.breadcrumb li a:before {
content: " ";
display: block;
width: 0;
height: 0;
border-top: 50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 30px solid #001940;
position: absolute;
top: 50%;
margin-top: -50px;
margin-left: 3px;
left: 100%;
}
.breadcrumb li:first-child a {
padding-left: 12px;
border:none;
}
.breadcrumb li:last-child a:after {
border:none;
}
.breadcrumb .current {
background:#007ACC; color:#fff;
pointer-events: none;
cursor: default;
}
.breadcrumb .current a:after {
border-left-color:#007ACC;
pointer-events: none;
cursor: default;
}
.breadcrumb li a:hover { background: #007ACC; }
.breadcrumb li a:hover:after { border-left-color: #007ACC !important; }
Also, how do I get all 3 breadcrumbs to be exactly the same size? At the minute the first one is bigger than the other 2.
Thanks in advance to anyone who can help!

CSS background image not loading, being overridden?

The background images for directional & navigational buttons are not loading. Firebug shows the images being overridden and states "the files are not being loaded". If I disable the "text-indent", I can see the plain old line items, but am looking for the images, so it looks nice and pretty!
I've been staring at this for too long now, can anyone help me see the problem? Thank you!
html
<div class="flex-container">
<div class="flexslider">
<ul class="slides">
<li><img src="images/tah_home.jpg" alt="taylor art house home page" width="600" height="320"/>
<p class="flex-caption">Taylor Art House Home Page</p></li>
<li><img src="images/tah_blog.jpg" alt="taylor art house blog page" width="600" height="320" />
<p class="flex-caption">We created a blog that fits seemlessly into Taylor Art House's look</p></li>
<li><img src="images/tah_artwork_page.jpg" alt="taylor art house art page" width="600" height="320" />
<p class="flex-caption">One of Taylor Art House's gallery pages, using a Wordpress plugin</p></li>
<li><img src="images/tah_arch_portfolio.jpg" alt="jon taylor architecture portfolio page" width="600" height="320" />
<p class="flex-caption">We created links to toggle from TAH to Jon Taylor Architecture</p></li>
</ul>
</div><!--end flexsider-->
</div><!--end flex-container-->
header script
<script src="jquery.flexslider.js"></script>
<script type="text/javascript" charset="utf-8">
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide",
slideshow: false,
controlNav: true,
manualControls: ".flex-control-nav li a",
controlsContainer: ".flex-container"
});
});
</script>
flexslider css
/*
* jQuery FlexSlider v1.8
* http://www.woothemes.com/flexslider/
*
* Copyright 2012 WooThemes
* Free to use under the MIT license.
* http://www.opensource.org/licenses/mit-license.php
*/
/* Browser Resets */
.flex-container a:active,
.flexslider a:active,
.flex-container a:focus,
.flexslider a:focus {outline: none;}
.slides,
.flex-control-nav,
.flex-direction-nav {margin: 0; padding: 0; list-style: none;}
/* FlexSlider Necessary Styles
*********************************/
.flexslider {
width: 100%;
margin: 0;
padding: 0;
}
.flexslider .slides > li {
display: none;
-webkit-backface-visibility: hidden;
}
/* Hide the slides before the JS is loaded. Avoids image jumping */
.flexslider .slides img {
max-width: 100%;
display: block;
}
.flex-pauseplay span {
text-transform: capitalize;
}
/* Clearfix for the .slides element */
.slides:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
html[xmlns] .slides {
display: block;
}
* html .slides {
height: 1%;
}
/* No JavaScript Fallback */
/* If you are not using another script, such as Modernizr, make sure you
* include js that eliminates this class on page load */
.no-js .slides > li:first-child {
display: block;
}
/* FlexSlider Default Theme
*********************************/
.flexslider {
width: 600px;
background: #fff;
border: 4px solid #999;
position: relative;
margin: 30px 0;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
-o-border-radius: 5px;
border-radius: 5px; zoom: 1;
}
.flexslider .slides {
zoom: 1;
}
.flexslider .slides > li {
position: relative;
}
/* Suggested container for "Slide" animation setups. Can replace this with your own, if you wish */
.flex-container {
zoom: 1;
position: relative;
margin-left:100px;
}
/* Caption style */
/* IE rgba() hack */
.flex-caption {
background:none;
-ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000,endColorstr=#4C000000);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000,endColorstr=#4C000000);
zoom: 1;
}
.flex-caption {
width: 96%;
padding: 2%;
margin: 0;
position: absolute;
left: 0;
bottom: 0;
background: rgba(0,0,0,.3);
color: #fff;
text-shadow: 0 -1px 0 rgba(0,0,0,.3);
font-size: 14px;
line-height: 18px;
}
/* Direction Nav */
.flex-direction-nav {
height: 0;
}
.flex-direction-nav li a {
width: 52px;
height: 52px;
margin: -13px 0 0;
display: block;
background: url(theme/bg_direction_nav.png) no-repeat;
position: absolute;
top: 50%;
cursor: pointer;
text-indent: -999em;
}
.flex-direction-nav li .next {
background-position: -52px 0; right: -21px;
}
.flex-direction-nav li .prev {
left: -20px;
}
.flex-direction-nav li .disabled {
opacity: .3;
filter:alpha(opacity=30);
cursor: default;
}
/* Control Nav */
.flex-control-nav {
width: 100%;
position: absolute;
bottom: -30px;
text-align: center;
}
.flex-control-nav li {
margin: 0 0 0 5px;
display: inline-block;
zoom: 1;
*display: inline;
}
.flex-control-nav li:first-child {
margin: 0;
}
.flex-control-nav li a {
width: 13px;
height: 13px;
display: block;
background: url(theme/bg_control_nav.png) no-repeat;
cursor: pointer;
text-indent: -999em;
}
.flex-control-nav li a:hover {
background-position: 0 -13px;
}
.flex-control-nav li a.active {
background-position: 0 -26px;
cursor: default;
}
styles.css
/* CSS Document for Kajort Designs */
/* ----- RESETS ----- */
* {
margin: 0;
padding: 0;
}
img {
border: none;
}
a {
text-decoration: none;
color: #000;
}
li {
list-style-type: none;
}
h1 {
margin-bottom: 20px;
margin-top: 20px;
font-size: 20px;
color: #999;
}
h2 {
font-size: 18px;
}
/* ----- GENERAL ----- */
body {
line-height: 19px;
font-size: 12px;
text-align: center; /* centers everything in IE */
font: 16px Arial, Helvetica, sans-serif;
color: #8A8A8A;
/* background-image:url(../images/bg_kd2.jpg);
*/}
#wrapper {
width: 960px;
margin: 30px auto; /* centers wrapper in most browsers */
text-align:left; /* resets IE center hack */
background-color:rgba(255,255,255,0.8);
padding: 20px;
}
/* ----- HEADER ----- */
/*#header {
width:250px;
height: 40px;
float: left;
font-size:24px;
}
#header a:hover {
border-bottom: 2px solid #ddd;
}*/
/* ----- NAVIGATION ----- */
#navigation {
width: 430px;
height: 40px;
float: right;
margin-top: 30px;
}
#navigation a:hover {
border-bottom: 2px solid #ddd;
}
#navigation li {
display: inline;
list-style-type: none;
padding-right: 10px;
}
#navigation-items li.main-on a {
border-bottom: 2px solid #ddd;
font-size:18px;
}
/* ----- MIDDLE ----- */
#main {
width: 104%;
background: #fff;
background: -moz-linear-gradient(top, #fff, #fff);
background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#fff));
padding: 10px 20px;
margin-left: -40px;
margin-top: 80px;
position: relative;
-moz-box-shadow: 1px 1px 3px #292929;
-webkit-box-shadow: 1px 1px 3px #292929;
}
#main .arrow {
width: 0; height: 0;
line-height: 0;
border-left: 20px solid transparent;
border-top: 10px solid #999;
top: 100%;
left: 0;
position: absolute;
}
#homecontent {
margin: 25px 0 25px 200px;
}
#content {
width: 800px;
margin-left: 100px;
overflow: hidden;
}
#servicescontent {
width: 700px;
margin-left: 40px;
}
#tools {
background-color:#EDEBDE;
padding: 20px 0 10px 20px;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
}
#seo {
background-color:#EDEBDE;
padding: 20px 0 10px 20px;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
}
.service_list {
margin: 10px 0 15px 30px;
}
.service_list li {
padding-bottom: 10px;
list-style-type:circle;
}
#panels_nav_st {
color:#666;
font-size:16px;
border-top: 2px solid #669933;
padding-top: 10px;
margin-top: 10px;
}
#panels_nav_st a {
color:#666;
font-size:16px;
}
#panels_nav_st a:hover {
color:#669933;
font-size:16px;
}
#panels_nav_ain {
color:#666;
font-size:16px;
border-top: 2px solid #91A6C1;
padding-top: 10px;
margin-top: 10px;
}
#panels_nav_ain a {
color:#666;
font-size:16px;
}
#panels_nav_ain a:hover {
color:#91A6C1;
font-size:16px;
}
#panels_nav_bees {
color:#666;
font-size:16px;
border-top: 2px solid #FC0;
padding-top: 10px;
margin-top: 10px;
}
#panels_nav_bees a {
color:#666;
font-size:16px;
}
#panels_nav_bees a:hover {
color:#FC0;
font-size:16px;
}
#panels_nav_ptc {
color:#666;
font-size:16px;
border-top: 2px solid #a1c857;
padding-top: 10px;
margin-top: 10px;
}
#panels_nav_ptc a {
color:#666;
font-size:16px;
}
#panels_nav_ptc a:hover {
color:#a1c857;
font-size:16px;
}
#panels_nav_tah {
color:#666;
font-size:16px;
border-top: 2px solid #FF7C5F;
padding-top: 10px;
margin-top: 10px;
}
#panels_nav_tah a {
color:#666;
font-size:16px;
}
#panels_nav_tah a:hover {
color:#FF7C5F;
font-size:16px;
}
#visit {
margin: 20px 0 20px 0;
width: 600px;
float: left;
color: #666;
}
#visit a {
text-decoration:underline;
}
#visit_st a:hover {
text-decoration:none;
color: #669933;
}
#visit_ain a:hover {
text-decoration:none;
color: #91A6C1;
}
#visit_bees a:hover {
text-decoration:none;
color: #fc0;
}
#visit_ptc a:hover {
text-decoration:none;
color: #a1c857;
}
#visit_tah a:hover {
text-decoration:none;
color: #FF7C5F;
}
#thumbnails li {
display: inline;
margin: 0 40px 40px 0;
}
#thumbnails img {
border: 1px solid #666;
padding: 5px 5px 10px 5px;
}
/* ----- FOOTER ----- */
#footer {
clear: both;
height: 50px;
margin-bottom: 15px;
margin-top: 60px;
text-align: center;
font-size: small;
color: #776E6E;
/* padding-top: 15px;
border-top: 3px solid #999;
*/
}
#footer a {
text-decoration: none;
color: #776E6E;
}
#footer a:hover {
border-bottom: 2px solid #ddd;
}
/* ----- NOT USED, BUT SAVE IN CASE ----- */
/*
#sidebar {
float: left;
color: #666;
padding: 10px 0 50px 50px;
font-size: 16px;
}
#sidebar li {
/* padding-bottom: 20px;
margin: 0 5px 15px 15px;
}
#sidebar a:hover {
color: #ddd;
border-bottom: 2px solid #ddd;
}
#sidebar h3 {
margin-bottom: 30px;
color: #333;
}
*/
Thank you!
The flexslider css is referring to the directional & navigational images in the theme folder. See below...
.flex-direction-nav li a {
...
background: url(theme/bg_direction_nav.png) no-repeat;
...
}
.flex-control-nav li a {
...
background: url(theme/bg_control_nav.png) no-repeat;
...
}
Point the url's to the correct location of the images and it'll work.

Having trouble with clear: both:

At this Test Link I seek to install header and main site navigation on to the top of a blog script.
My clear:both; worked on the main site script but throws everything to the side now. Have tried numerous fixex without success! Thanks in advance for ant pointers to resolve. Clear:both; is in the footer.
/*/////////////////////MAIN SITE NAVIGATION BAR////////////////////*/
.dropnav {
width: 100%;
float: left;
margin: 0 0 1em 0;
padding: 0;
background-color: #3b3b44; /*Navigation Active Background*/
border-top: 1px solid #ccf;
}
.dropnav ol {
list-style: none;
width: 950px;
margin: 0 auto;
padding: 0;
overflow: hidden;
}
.dropnav li {
float: left; }
.dropnav li a {
display: block;
padding: 8px 25px;
text-decoration: none;
font-family: Helvetica, arial, sans-serif;
font-size: 20px;
font-weight: bold;
color: #fff; /*Active Text Color*/
border-right: 1px solid #ccf;
border-bottom: none;
}
.dropnav li:first-child a {
border-left: 2px solid #ccf; }
.dropnav li a:hover {
color: #000; /*Active Hover Color*/
background-color: #8db3ff; } /*Navigation Hover Background*/
/*////////////////STYLING TO DROPDOWN MENU//////////////////////*/
.dropnav li ol {
display: none;
width: 13em; } /*Define width of dropdown button*/
.dropnav li:hover ol {
display: block;
position: absolute;
margin: 0;
padding: 0; }
.dropnav li:hover li {
float: none; }
.dropnav li:hover li a {
background-color: #3b3b44; /*Navigation Active Background*/
border-bottom: 1px solid #ccf;
border-top: 1px solid #ccf;
border-right: 1px solid #ccf;
border-left: 1px solid #ccf;
font-size: 16px;
color: #fff; } /*Text Color*/
.dropnav li li a:hover {
color: #000;
background-color: #8db3ff; /*Navigation Hover Background*/
}
/*//////////////////END MAIN SITE NAVIGATION////////////////////*/
#container {
width: 950px;
padding-left: 0px;
padding-right: 0px;
margin: 1px auto;
background: #fafafa;
}
#header {
width: 950px;
margin-top: 15px;
}
#content {
padding-left: 5px;
padding-right: `5px;
}
#footer {
clear: both;
background: #3b3b44;
color: #ccf; /*text*/
/*margin-top: 10px;*/
margin-bottom: 10px;
padding-top: 5px;
padding-left: 15px;
padding-bottom: 5px;
border-top: 2px solid #cc0;
line-height: 1.2em;
}
you have two id's with the same name as container. you id needs to be unique and also id fieldset and i guess all your tags are not closed properly very those.
you can put a clear div after you menu to clear out this row. It is the same principle use in the 960 grid sytem.
www.960.gs
But here is a link to see the code and the result.
http://jsfiddle.net/etienne_carre/9x2P3/
Thx

Resources