Media Queries on Joomla 3 Not working Suddenly - joomla

For some reason, my Joomla 3 website (using the Protostar Template) has media queries that just aren't working anymore. A specific example is located on this page. If you view the page on your phone, the large bus image on the page is supposed to "stack" on the text below it once the window gets to 599px or less.
What's strange is things like this were working, then suddenly stopped working. I tried to find out what could have gone wrong with no luck.
Here's my CSS Code that includes the media queries. I just put it all in the template.css file:
.bustype{width:206px;
height:296px;
border:2px solid black;
margin-right:10px;
margin-left:10px;
margin-bottom:25px;
display:inline-block;
padding:5px
}
#bustypewrap{
width:100%;
margin:auto;
text-align:center;}
.busimage{
width:45%;
margin-left:5%;
float:left}
.buscopy{
width:40%;
float:right;
text-align:justify}
.clearitall{
clear:both;}
.footerbb{
width:100%;
padding:15px;
margin-top:20px;
text-align:center;
background-color:#00467e;
color:#fff;}
.spectable{
display:block;
}
.spectablemobile{
display:none;
}
.mobilelogo{
display:none;
}
.buttonblue, .buttonblue:hover {
font-size:18px;
a{color:#fff;}
a:hover{color:#fff;}
background-color: #1d78cb;
-webkit-box-shadow: 0px 3px 0px 0px #0f3e68;
-moz-box-shadow: 0px 3px 0px 0px #0f3e68;
box-shadow: 0px 3px 0px 0px #0f3e68;
}
.mobilebanner{display:none;}
.popupimagesbuses{
float:left;
margin:10px;}
}
#media only screen and (max-device-width: 599px) {
.spectablemobile{
display:block;
}
.spectable{
display:none;
}
.busimage{
width:100%;
}
.buscopy{
width:100%;
text-align:justify}
.mobilebanner{display:block;}
#content{
padding-left:10px;
padding-right:10px;
}
body{
padding-left:0px!important;
}
}
#media only screen and (max-device-width: 979px) {
.mobilelogo{
display:block;
}
}
I only included the code that I added in, the rest is basic CSS from the template (Protostar) that may be modified with colors, etc- but that's about it.
Any help you can provide will be greatly appreciated! Thank you.

You have a typo before the media query (an extra curly brace ...):
.popupimagesbuses{
float:left;
margin:10px;}
}

Related

Rollover Image effect stop working

when i put in my social media icons with "Rollover Image", my main navigation rollover image effects stop working. Why is that?
the layout: http://postimg.org/image/n8xfmtodj/
My css:
wrapper
{ width:900;
margin:-15px auto 20px auto;
background-color:#000;
padding:0 40px;
box-shadow: 0px 0px 10px 5px rgba(0,0,0,.2);
background-color: rgba(0,0,0,0.8);
float:none; width:900; height:100%; }
mainNav
{ width:90%;
height:90%;
position:absolute;
bottom:0px;
margin:0px 0px 0px 0px;
padding:0px 0px 0px 10px;
text-align:left; }
socialMedia
{width:97.5%;
height:98%;
position:absolute;
bottom:0px;
margin:0px 0px 0px 0px;
padding:0px 0px 0px 10px;
text-align:right }
yes i got # before every category in the css docoment just dident get it to work, its my (my first question)

Disable dropdown on hover for bootstrap when navbar is collapsed

I have implemented the css as shown here: How to make twitter bootstrap menu dropdown on hover rather than click
However want to disable the dropdown on hover when the navbar collapses as it acts a bit buggy.
How can I do it?
You could try wrapping the CSS to disable the dropdown in a media query so that it is only disabling it at a certain page width... Reading up on media queries and trying to understand how bootstrap implements them is going to be one the keys to debugging this. Here's what I tried with the previous answer's fiddle.
http://jsfiddle.net/2Smgv/5544/
#media (min-width: 767px) {
.sidebar-nav {
padding: 9px 0;
}
.dropdown-menu .sub-menu {
left: 100%;
position: absolute;
top: 0;
visibility: hidden;
margin-top: -1px;
}
.dropdown-menu li:hover .sub-menu {
visibility: visible;
}
.dropdown:hover .dropdown-menu {
display: block;
}
.nav-tabs .dropdown-menu, .nav-pills .dropdown-menu, .navbar .dropdown-menu {
margin-top: 0;
}
.navbar .sub-menu:before {
border-bottom: 7px solid transparent;
border-left: none;
border-right: 7px solid rgba(0, 0, 0, 0.2);
border-top: 7px solid transparent;
left: -7px;
top: 10px;
}
.navbar .sub-menu:after {
border-top: 6px solid transparent;
}
}

CSS3 Pie not working with SASS/Compass

I'm having trouble getting CSS3Pie to work. I've read several posts on SO and Google and still can't to seem to get it work.
I'm using SASS and compass to write my CSS so I'll post both SCSS and CSS outputs below.
SCSS:
$pie-behavior: url(PIE.htc);
$pie-base-class: pie-element;
#header{
background:#fff;
width:$full-width;
height:100px;
margin:$margin-center;
ul{
width:600px;
height:$nav-height - 2px;
padding:55px 0 0;
margin:0 0 0 250px;
li{
#include inline-block;
font-size:$font-size - 2px;
font-weight:bold;
padding:20px 10px;
}
a{
color:#282828;
text-transform:uppercase;
&:hover{
color:red;
}
}
}
#aabw{
background:url('../images/aabw.jpg') no-repeat;
height:190px;
width:110px;
position:relative;
z-index: 0;
float:right;
margin: 0 270px 0 0;
#include pie-element(relative);
#include box-shadow(#BBBBBB 0px -78px 6px);
}
}
Outputted CSS:
#header #aabw {
background: url("../images/aabw.jpg") no-repeat;
height: 190px;
width: 110px;
position: relative;
z-index: 0;
float: right;
margin: 0 270px 0 0;
behavior: url(PIE.htc);
position: relative;
-webkit-box-shadow: #bbbbbb 0px -78px 6px;
-moz-box-shadow: #bbbbbb 0px -78px 6px;
box-shadow: #bbbbbb 0px -78px 6px;
}
My PIE.htc is in the room directory (same folder as my index) and I'm trying to run it locally. I've followed the pie.scss file and nothing seems to work, it may be a case of me missing something blatantly obvious so hopefully someone might be able to spot something I'm missing?
Thanks
not sure, but try putting the PIE call after the box-shadow call.

Custom output for session:messages?

In PyroCMS, I'm using the session:messages tag to display messages to the user. This is working well, but I'd like to add a close button to each message which requires placing a span within each message. For example:
<div class="alert success">
You have logged in successfully. <span class="close">X</span>
</div>
Each message is wrapped in a div, which is given a class by setting an attribute of the session:messages tag. There is no built-in way to specify the output. How can I override the messages() function in session.php, adding a new attribute to append this close button?
So far I have tried:
Copying system/cms/plugins/session.php to *addons/shared_addons/plugins/session.php* and modifying the messages() function. The core function is used, rather than the new plugin as I had hoped.
Copying the plugin as described above, and then changing it's class to My_Plugin_Session extends Plugin_Session in hopes that its functions would then override the core Plugin_Session class. No luck.
It's not possible to extend certain things that are in the core (e.g. libraries and helpers) - I think this applies to plugins too.
In this case, if I was you (and I may well have to do this for my next project as these closable alerts are typically in Twitter Bootstrap etc.) I'd just edit /system/cms/plugins/session.php directly and add the extra <span> for the close button to the success, notice and error conditionals ('if' statements).
On a typical site I can't think of a situation where you'd ever need some alerts displayed differently to others (other than different colours depending on the outcome of course, which you can do in the CSS using the class name).
Providing you're using Git (you've cloned or forked the official PyroCMS repository and made your own branch) you'll be absolutely fine with future updates - if in a future version the session plugin changes, any changes will just be merged into your code automatically, or if Git can't figure it out, it'll show you the differences and prompt you to fix it by hand.
Note - there are a couple of other solutions for this specific problem based on the admin interface (you may have noticed the flash messages there are closable).
You could create a partial - which can contain PHP, not just Lex tags - e.g. see /system/cms/themes/pyrocms/views/admin/partials/notices.php with something like this (edit as needed and duplicate for notice and error):
<?php if ($this->session->flashdata('success')): ?>
<div class="alert success">
<?php echo $this->session->flashdata('success'); ?>
</div>
<?php endif; ?>
PyroCMS admin actually uses liveQuery to append the close button <span> in the browser
Source: /system/cms/modules/wysiwyg/js/wysiwyg.js:
// Add the close link to all alert boxes
$('.alert').livequery(function(){
$(this).prepend('x');
});
I did this and it is working perfect no need other plugin than jQuery.
in the template layout add this:
{{ session:messages success="message success" notice="message info" error="message error" }}
JavaScript:
$(function() {
$('.message').prepend('<a class="baxclose" id="baxclose"></a>');
$('#baxclose').click(function(){
$('.message').fadeOut('slow');
});
});
and the CSS:
a.baxclose{
float:left;
width:30px;
height:30px;
background:transparent url(../img/close-icon.png);
margin-top: -30px;
margin-left: -30px;
cursor:pointer;
}
.message {
padding: 20px 20px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
margin-bottom: 10px;
-moz-box-shadow:inset 0 2px 3px rgba(255,255,255,0.5), 0 2px 3px rgba(0,0,0,0.1);
-webkit-box-shadow:inset 0 2px 3px rgba(255,255,255,0.5), 0 2px 3px rgba(0,0,0,0.1);
box-shadow:inset 0 2px 3px rgba(255,255,255,0.5), 0 2px 3px rgba(0,0,0,0.1);
zoom: 1;
margin-bottom: 20px;
}
.message h3 {
margin-top: 0;
font-size: 12px;
font-weight: bold;
}
.message p {
margin-bottom: 0;
}
.message.info {
border: 1px solid #cadcea;
background-color: #cdf;
background-image: -o-linear-gradient(top, #eef, #cdf);
background-image: -ms-linear-gradient(top, #eef, #cdf);
background-image: -moz-linear-gradient(top, #eef, #cdf);
background-image: -webkit-gradient(linear, left top, left bottom, from(#eef), to(#cdf));
background-image: -webkit-linear-gradient(top, #eef, #cdf);
background-image: linear-gradient(top, #eef, #cdf);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#EEEEFF', endColorstr='#CCDDFF');
color: #225b86;
text-shadow: 0 1px 1px #fff;
}
.message.error {
border: 1px solid #eeb7ba;
background-color: #fae2e2;
background-image: -o-linear-gradient(top, #fae2e2, #f2cacb);
background-image: -ms-linear-gradient(top, #fae2e2, #f2cacb);
background-image: -moz-linear-gradient(top, #fae2e2, #f2cacb);
background-image: -webkit-gradient(linear, left top, left bottom, from(#fae2e2), to(#f2cacb));
background-image: -webkit-linear-gradient(top, #fae2e2, #f2cacb);
background-image: linear-gradient(top, #fae2e2, #f2cacb);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fae2e2', endColorstr='#f2cacb');
color: #be4741;
text-shadow: 0 1px 1px #fff;
}
.message.success {
border: 1px solid #b8c97b;
background-color: #e5edc4;
background-image: -o-linear-gradient(top, #e5edc4, #d9e4ac);
background-image: -ms-linear-gradient(top, #e5edc4, #d9e4ac);
background-image: -moz-linear-gradient(top, #e5edc4, #d9e4ac);
background-image: -webkit-gradient(linear, left top, left bottom, from(#e5edc4), to(#d9e4ac));
background-image: -webkit-linear-gradient(top, #e5edc4, #d9e4ac);
background-image: linear-gradient(top, #e5edc4, #d9e4ac);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e5edc4', endColorstr='#d9e4ac');
color: #3f7227;
text-shadow: 0 1px 1px #fff;
}
Instead of the button you use to remove, another option would be to create a fadeOut message on click event.
HTML:
<div id="msgAlert"> …session:messages goes here...</div>
JS:
<script type="text/javascript">
$('html').click(function() { $('#msgAlert').delay(5000).fadeOut('slow'); });
Having a click will fadeOut the session message after 5sec.

href link not working in ie 8

I just can't figure this out. The links below work absolutely fine in every browser except IE8. If you click on the elements in IE8, the button disappears. If you click again where it was it reappears. But no amount of clicking will actually lead you to the href location. Can anybody explain to me why that might be? I've exhausted all of my thoughts and it still doesn't work. Many thanks for all your thoughts!
The html...
<div style="padding:0px 0px 30px 0px; clear: both;">
<div style="width: 50%; display: block; float: left;">
Learn More
</div>
<div style="width: 50%; display: block; float: left;">
Get Started
</div>
</div>
...and the stylesheet...
.big_button {
-moz-box-shadow: inset 0px 1px 0px 0px #bbdaf7;
-webkit-box-shadow: inset 0px 1px 0px 0px #bbdaf7;
box-shadow: inset 0px 1px 0px 0px #bbdaf7;
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #79bbff
), color-stop(1, #378de5) );
background: -moz-linear-gradient(center top, #79bbff 5%, #378de5 100%);
filter: progid : DXImageTransform.Microsoft.gradient (
startColorstr = '#79bbff', endColorstr = '#378de5' );
background-color: #79bbff;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
border: 1px solid #84bbf3;
display: inline-block;
color: #ffffff;
font-family: Arial;
font-size: 18px;
font-weight: bold;
padding: 15px 45px;
text-decoration: none;
margin-left: 130px;
}
.big_button:hover {
background: -webkit-gradient(linear, left top, left bottom, color-stop(0.05, #378de5), color-stop(1, #79bbff) );
background: -moz-linear-gradient(center top, #378de5 5%, #79bbff 100%);
filter: progid : DXImageTransform.Microsoft.gradient (startColorstr = '#378de5', endColorstr = '#79bbff' );
background-color: #378de5;
}
.big_button:active {
position: relative;
top: 1px;
}
Its because of the 'filter:' part in your css, remove it, then it will work...
I just figured it out. IE8 seems to have a problem with :active in css. So the following section of the stylesheet was causing issues:
.big_button:active {
position: relative;
top: 1px;
}
Current fix is to exclude the ':active' part of the css for the button as it's not essential. If anybody has any further information on why IE8 has issues with :active, I'd be interested to know about it.

Resources