Minify media query? - css
I have a completely valid CSS stylesheet, which works, and queries are recognized, but when I minify (and concatenate) the stylesheets with SquishIt, the media queries seemingly stop working, and I can't figure out why.
This is the minified CSS, beautified:
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video {
border:0;
outline:0;
font-size:100%;
font:inherit;
vertical-align:baseline;
background:transparent;
color:inherit;
margin:0;
padding:0;
}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section {
display:block;
}
body {
line-height:1;
word-wrap:break-word;
overflow-x:hidden;
font-family:"Helvetica Neue","Lucida Grande","Segoe UI",Arial,Helvetica,Verdana,sans-serif;
}
ol,ul {
list-style:none;
margin-bottom:1em;
margin-left:30px;
}
blockquote,q {
quotes:none;
}
blockquote:before,blockquote:after,q:before,q:after {
content:none;
}
:focus {
outline:0;
}
table {
border-collapse:collapse;
border-spacing:0;
}
th {
text-align:left;
}
.layout-section {
width:93.75%;
text-align:left;
margin:0 auto;
}
header#layout-header {
margin-bottom:20px;
padding:12px 0;
}
header#layout-header h1 {
display:inline-block;
font-family:Calibri,Candara,Segoe,"Segoe UI",Optima,Arial,Helvetica,sans-serif;
font-weight:700;
font-size:2.4em;
margin:0 auto;
}
section#layout-content {
padding:6px 0;
}
section#layout-content h1 {
margin-bottom:12px;
}
#noscript-padding {
padding-bottom:37px;
}
#noscript-notice {
position:fixed;
top:0;
left:0;
width:100%;
z-index:99;
text-align:center;
font-family:sans-serif;
font-weight:700;
font-size:1.1em;
background-color:#ce756b;
color:#fff;
border-bottom:2px solid #9d0000;
cursor:not-allowed;
padding:6px 0;
}
#noscript-notice .ie-warning {
padding-top:6px;
}
html,body,form {
height:100%;
}
section#layout-container {
min-height:100%;
height:auto!important;
margin:0 auto -72px;
}
a#menu-icon {
float:right;
font-size:12px;
font-weight:700;
line-height:22px;
height:22px;
letter-spacing:.1em;
margin-top:10px;
color:#fff;
background:#4e4e4e;
text-transform:uppercase;
text-decoration:none;
-webkit-border-radius:3px;
-moz-border-radius:3px;
border-radius:3px;
-moz-background-clip:padding;
-webkit-background-clip:padding-box;
background-clip:padding-box;
padding:0 10px;
}
nav#menu {
margin-top:30px;
}
nav#menu ol {
background:#1c1c1c;
padding:5px 0;
}
nav#menu li a {
display:block;
font-weight:700;
text-transform:uppercase;
letter-spacing:.1em;
line-height:2em;
height:2em;
color:#fff;
text-decoration:none;
border-bottom:1px solid #383838;
padding:0 20px;
}
nav#menu li:last-child a {
border-bottom:none;
}
.left {
float:left;
}
.right {
float:right;
}
.hidden {
display:none!important;
}
h1 {
font-size:1.6em;
}
h2 {
font-size:1.5em;
}
h3 {
font-size:1.4em;
}
h4 {
font-size:1.3em;
}
h5 {
font-size:1.2em;
}
h6 {
font-size:1.1em;
}
hr {
border:0 none;
height:1px;
margin-bottom:20px;
}
blockquote {
margin-bottom:10px;
padding:10px 10px 1px;
}
pre,code {
font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,serif;
}
pre {
margin-bottom:10px;
max-height:600px;
overflow:auto;
width:auto;
padding:5px;
}
b,strong,.bold {
font-weight:700;
}
i,em,.italic {
font-style:italic;
}
del {
text-decoration:line-through;
}
img {
border:none;
}
ol,ul,li,p {
word-wrap:break-word;
}
ol {
list-style:decimal outside none;
}
ul {
list-style:disc outside none;
}
nav ol,nav ul {
list-style:none;
margin:inherit;
}
form legend {
padding-bottom:12px;
}
form input,form textarea,form button,form a.button {
margin-bottom:10px;
margin-right:3px;
display:inline-block;
padding:8px;
}
form input[type=text],form input[type=password],form textarea {
width:75%;
}
form input[type=submit],form form button.submit {
display:block;
text-align:center;
}
fieldset .field-validation-valid,fieldset .field-validation-error {
font-size:.8em;
display:block;
margin-bottom:15px;
}
fieldset .field-validation-valid.tooltip-icon,fieldset .field-validation-error.tooltip-icon {
display:inline-block;
margin-bottom:0;
background-image:url(/content/images/sprites/icons.png);
width:16px;
height:16px;
vertical-align:middle;
}
fieldset .field-validation-valid.tooltip-icon {
background-position:-208px -192px;
}
fieldset .field-validation-error.tooltip-icon {
background-position:-32px -192px;
}
.dialog {
display:none;
position:absolute;
top:50%;
left:50%;
font-size:100%;
background-color:#fff;
border:2px solid #222;
padding:15px;
}
.dialog>header {
font-family:Trebuchet MS,Helvetica,sans-serif;
font-size:1.4em;
font-weight:700;
margin-bottom:7px;
text-decoration:underline;
}
.dialog.notification {
cursor:pointer;
-webkit-box-shadow:2px 2px 5px #400;
-moz-box-shadow:2px 2px 5px #400;
box-shadow:2px 2px 5px #400;
color:#fff;
}
.dialog .dialog-buttons {
text-align:right;
margin-top:20px;
}
.tooltip {
text-align:center;
color:#fff;
background:#111;
position:absolute;
z-index:100;
padding:15px;
}
.tooltip:after {
width:0;
height:0;
border-left:10px solid transparent;
border-right:10px solid transparent;
border-top:10px solid #111;
content:'';
position:absolute;
left:50%;
bottom:-10px;
margin-left:-10px;
}
.tooltip.tooltip-top:after {
border-top-color:transparent;
border-bottom:10px solid #111;
top:-20px;
bottom:auto;
}
.tooltip.tooltip-left:after {
left:10px;
margin:0;
}
.tooltip.tooltip-right:after {
right:10px;
left:auto;
margin:0;
}
nav#menu li span {
color:#fff;
}
nav#menu li a:hover,nav#menu li a:focus {
color:#1c1c1c;
background:#ccc;
}
a,button,input[type=submit] {
cursor:pointer;
}
button.disabled,a.button.disabled {
cursor:not-allowed;
}
nav a,button.submit,input[type=submit] {
font-variant:small-caps;
}
input[type=submit],button.submit,a.button {
border:1px solid #313131;
background-color:#dbdbdb;
color:#171515;
}
form input.valid {
background-color:#F0FFFF;
}
form input.input-validation-error {
background-color:#fff0ff;
}
.dialog.notification.notification-error {
background-color:#ce756b;
border:2px solid #9d0000;
}
.dialog.notification.notification-message {
background-color:#ff8c00;
border:2px solid #cc8c00;
}
.exception {
padding:8px;
}
.exception>header {
font-weight:700;
font-size:1.1em;
color:#c00000;
margin-bottom:5px;
}
.exception>.stacktrace {
line-height:1.2em;
color:#333;
display:none;
}
.exception>.stacktrace p {
font-size:.8em;
margin:0 0 0 5px;
}
.exception>.inner {
margin-left:20px;
display:none;
}
section.rendering-error {
color:#C00000;
font-size:.8em;
font-weight:700;
margin:10px;
}
h2.error-description {
font-size:1em;
text-align:center;
color:#462046;
}
section#error-page {
text-align:center;
padding:20px;
}
section#error-page img {
width:160px;
}
img#nomnom-standing {
vertical-align:middle;
}
section.logon-container p.login-required {
display:block;
margin-bottom:24px;
}
form.site-logon {
vertical-align:top;
}
form.site-logon input[type=submit] {
margin:0 auto;
}
form.provider-logon {
display:block;
margin-top:35px;
}
form.provider-logon a.logon-provider-button {
display:inline-block;
margin:4px;
}
form.provider-logon a.provider-icon {
background-image:url(/content/images/sprites/providers-small.png);
width:32px;
height:32px;
}
form.provider-logon a.provider-icon.google-icon {
background-position:0 0;
}
form.provider-logon a.provider-icon.fb-icon {
background-position:-32px 0;
}
form.provider-logon a.provider-icon.twitter-icon {
background-position:-64px 0;
}
form.provider-logon a.provider-icon.yahoo-icon {
background-position:-96px 0;
}
section.create-post {
width:90%;
max-width:300px;
padding-left:12px;
margin:0 auto;
}
section.posts>article,section.more-posts {
margin-top:20px;
}
section.posts>article:first-child {
margin-top:0;
}
section.posts>article>header {
font-size:1.5em;
font-weight:700;
text-align:left;
}
section.posts>article>a.post-thumbnail img {
max-height:125px;
max-width:40%;
float:left;
margin-top:8px;
margin-right:12px;
margin-bottom:12px;
}
section.posts>article>a.post-image img {
max-height:300px;
max-width:100%;
margin-top:8px;
}
section.posts>article>section {
font-size:.8em;
line-height:1.2em;
text-align:left;
}
section.posts>article>section.post-description {
margin-top:8px;
}
div#push,footer#footer,fieldset .field-validation-valid.model-validation,h1.error-title,section#error-page>section#server-room,section#error-page>aside#error-content,section#error-page>footer,img#servers,section.preview-container {
display:none;
}
.clear,section.posts>article {
clear:both;
}
.center,section.logon-container,form.site-logon p,form.provider-logon section.provider-buttons,section.posts,section.more-posts {
text-align:center;
}
ins,a,a.button:hover {
text-decoration:none;
}
a:hover,#noscript-notice a {
text-decoration:underline;
}
#media only screen andmin-width768px{
header#layout-header {
margin-bottom:30px;
}
#noscript-padding {
padding-bottom:22px;
}
div#push {
display:inherit;
height:72px;
}
footer#footer {
display:inherit;
margin-top:40px;
height:12px;
text-align:center;
font-size:.7em;
padding:10px 0;
}
section#layout-content {
position:relative;
}
nav#menu {
margin-top:0;
position:absolute;
top:16px;
right:3.125%;
max-width:45%;
}
nav#menu ol {
-webkit-border-radius:4px;
-moz-border-radius:4px;
border-radius:4px;
-moz-background-clip:padding;
-webkit-background-clip:padding-box;
background-clip:padding-box;
padding:5px;
}
a#menu-icon,nav#menu li.nav-top {
display:none;
}
nav#menu li {
display:inline-block;
}
nav#menu li a {
float:left;
border:none;
-webkit-border-radius:2px;
-moz-border-radius:2px;
border-radius:2px;
-moz-background-clip:padding;
-webkit-background-clip:padding-box;
background-clip:padding-box;
border-bottom:inherit;
padding:0 10px;
}
header#layout-header h1 {
font-size:3.2em;
}
.exception {
margin-bottom:20px;
}
img#server {
padding-right:2px;
}
img#nomnom {
padding-left:4px;
}
section#error-page {
max-width:500px;
margin:0 auto;
}
section#error-page img {
width:200px;
}
section#error-page>img#notfound-sign,section#error-page>aside#error-content {
display:inline-block;
vertical-align:middle;
}
aside#error-content {
width:250px;
padding-left:30px;
border-left:1px solid #642D64;
margin-left:10px;
text-align:left;
}
aside#error-content header {
color:#642D64;
font-weight:700;
margin-bottom:20px;
}
aside#error-content p {
font-size:.9em;
line-height:1.3em;
margin-bottom:10px;
}
section#error-page>footer {
clear:both;
}
section#error-page>footer .apologies {
text-align:center;
padding-top:30px;
color:#642D64;
clear:left;
font-size:1.2em;
}
section#error-page>footer a {
text-align:center;
display:block;
padding-top:3px;
}
section.logon-container {
margin-top:3%;
}
form.site-logon {
display:inline-block;
margin-right:15px;
width:300px;
}
form.provider-logon {
padding-left:30px;
border-left:1px solid #ddd;
margin-top:0;
display:inline-block;
}
form.provider-logon a.provider-icon {
background-image:url(/content/images/sprites/providers-large.png);
width:100px;
height:60px;
}
form.provider-logon a.provider-icon.google-icon {
background-position:0 0;
}
form.provider-logon a.provider-icon.fb-icon {
background-position:-100px 0;
}
form.provider-logon a.provider-icon.twitter-icon {
background-position:-200px 0;
}
form.provider-logon a.provider-icon.yahoo-icon {
background-position:-300px 0;
}
form.provider-logon section.provider-buttons {
width:230px;
margin:0 auto;
}
section.create-post {
max-width:400px;
padding-left:20px;
}
section.posts {
min-width:700px;
max-width:900px;
margin:0 auto;
}
section.posts>article:first-child+article {
margin-top:0;
}
section.posts>article {
clear:none;
float:left;
width:45%;
}
section.posts>article.even {
margin-right:35px;
clear:both;
}
section.posts>article>a.post-thumbnail img {
max-height:200px;
max-width:50%;
}
section.posts>article>a.post-image img {
max-height:450px;
max-width:95%;
margin-top:16px;
}
.exception>.stacktrace,.exception>.inner,h1.error-title {
display:inherit;
}
}
#media only screen andmin-width1024px{
header#layout-header {
margin-bottom:40px;
}
nav#menu {
top:28px;
}
header#layout-header h1 {
font-size:4.6em;
}
section#error-page {
max-width:1200px;
}
section#error-page>section#server-room {
margin-right:20px;
display:inherit;
float:left;
}
section#error-page>section#server-room img {
width:180px;
}
section#error-page>footer {
display:inherit;
}
img#server {
vertical-align:middle;
}
img#nomnom {
vertical-align:bottom;
}
section#error-page>img#servers {
margin-right:20px;
display:inherit;
float:left;
width:40%;
}
section#error-page>img#nomnom-standing,section#error-page>aside#error-content {
margin-top:20px;
}
section.posts {
max-width:1000px;
}
section.posts>article,section.more-posts {
margin-top:32px;
}
section.posts>article.even {
margin-right:50px;
}
}
#media only screen\0{
#noscript-padding {
padding-bottom:67px;
}
}
#media only screen\0 andmin-width768px{
#noscript-padding {
padding-bottom:47px;
}
}
I'm using YuiCompressor,
but apparently it minifies media queries as:
#media only screen andmin-width768px{
How should I fix this?
Post here which decribes the same problem and the solution is to download the latest version of the compression software:
http://www.456bereastreet.com/archive/201012/yui_compressor_and_css_media_queries/
Related
How to put pager of a listview in a new line in Yii2
I have a theme, which I have integrated with yii2, when using pager of list view, I have the pager beside divs I add to the list view items, I need to put the pager in a new line alone. I used the following view: <style> #items { } </style> <?php use yii\web\View; use yii\widgets\LinkPager; use yii\widgets\ListView; //This is a php syntax to write register scripts $this->registerJs("m_active='bio'", View::POS_END); ?> <div class=" container"> <div class="app-alem-form"> </div> </div> <div id="bio" class="section bg1"> <div class="head color2"> <div class="title">سيرة العلماء</div> <i class="icon fa fa-graduation-cap"></i> </div> <div class="container flex1"> <!--<div class="container container-fluid row" id="items">--> <!--<div class="row" id="items">--> <?= ListView::widget([ 'dataProvider' => $listDataProvider, 'options' => [ 'tag' => 'div', 'class' => 'list-wrapper', 'id' => 'list-wrapper', ], 'layout' => '{items}{pager}{summary}', 'layout' => "{summary}\n{items}\n{pager}", 'itemView' => function ($model, $key, $index, $widget) { echo ("<div class='item-holder')> <a href = '?r=alem%2Fget-olama&id=" . $model->attributes['id'] . "'> <div class='item'> <div class='default cover' style='background:url(img/olama/" . $model['c_image'] . "); background-size:contain;'></div> <div class='title'>" . $model->attributes['c_name'] . "</div> </div> </a> </div>"); }, 'pager' => [ 'firstPageLabel' => 'first', 'lastPageLabel' => 'last', 'nextPageLabel' => '>>', 'prevPageLabel' => '<<', 'maxButtonCount' => 3, ], ]); ?> </div> </div> and the portion of my style sheet that is related to this page is the following: #main .bio .container .item-holder { padding:10px; width:calc(100% / 4); display:table; /* display: inline;*/ } #main .bio .container .item-holder .item { background:#fff; border:1px solid #aaa; padding:10px; } #main .bio .container .item-holder .item .cover { width:100%; height:200px; border:1px double #aaa; } #main .bio .container .item-holder .item .title { text-align:center; } /*Site Main End*/ #bio .container { flex-direction:row-reverse; flex-wrap:wrap; align-items:flex-start; justify-content:flex-start; } #bio .container .item-holder { padding:10px; width:calc(100% / 4); } #bio .container .item-holder .item { background:#fff; padding:10px; } #bio .container .item-holder .item .cover { width:100%; height:200px; border:1px double #aaa; } #bio .container .item-holder .item .title { text-align:center; } #media (max-width: 900px) { #bio .container .item-holder { padding:10px; width:calc(100% / 2); } } #media (max-width: 600px) { #bio .container .item-holder { padding:10px; width:calc(100% / 1); } } The full style sheet is in the following : #font-face { font-family: tahoma; src: url(../fonts/Tahoma.ttf); } #font-face { font-family: droudKufi; src: url(../fonts/DroidKufi-Regular.ttf); } /* Site Fonts End*/ body { margin:0; overflow:auto; font-family:droudKufi, arial; background:#eee; } form { margin:0; } input, textarea, select { outline:none; font-family:inherit; transition:ease 0.3s all; width:100%; padding:3px 7px; border:1px solid #aaa; direction:rtl; border-radius:5px; } input:focus, textarea:focus, select:focus { border-color:#32aae1 !important; box-shadow: 0px 0px 7px rgba(81, 203, 238, 1);; } textarea { resize:none; } button { outline:none; font-family:inherit; cursor:pointer; transition:ease 0.3s all; border:1px solid #aaa; padding: 5px 10px; border-radius: 10px; font-size: 16px; } div { box-sizing:border-box; } a { text-decoration:none; } a { color:inherit; } .container { margin-right: auto; margin-left: auto; padding-left: 20px; padding-right: 20px; } #media (min-width: 901px) {.container { width: 870px; }} #media (min-width: 992px) { .container { width: 980px; }} #media (min-width: 1200px) { .container { width: 1180px; }} .color1 { color:#296E9D; } .color2 { color:#ED2024; } .default { background-repeat:no-repeat !important; background-position:center !important; background-size:initial; background:url(../img/logo.png) #fff; } .shadow-box { position:fixed; width:100vw; height:100vh; max-width:100%; display:flex; align-items:center; justify-content:center; z-index:99999; top:0; left:0; display:none; } .shadow-box .container { z-index:99999; } .shadow-box .overlay { position:absolute; background:rgba(0,0,0,0.8); width:100%; height:100%; top:0; left:0; } .section { padding:40px 0; text-align:center; width:100%; } .section.bg1 { background:#fff; } .section.bg2 { background:#296E9D; } .section .container.flex1 { display:flex; align-items:center; justify-content:center; } .section .container.flex2 { display:flex; align-items:center; justify-content:center; flex-direction:column } .section .btn1, .section .btn2:hover { color:#296E9D; background:#fff; } .section .btn1, .section .btn2 { margin-top:20px; } .section .btn2, .section .btn1:hover { color:#fff; background:#296E9D; } .section .head { margin-bottom:30px; display:flex; align-items:center; justify-content:center; } .section .head.color1 { color:#fff; } .section .head.color2 { color:#296E9D; } .section .head .title { font-size:38px; } .section .head .icon { font-size:40px; margin-left:20px; } .pagination-holder { display:flex; justify-content:center; align-items:center; margin-top:20px; width:100%; } .pagination-holder .item { height:40px !important; width:40px; display:flex; justify-content:center; align-items:center; margin:0 5px; border-radius:10px; cursor:pointer; color:#296E9D; background:#fff; transition:ease 0.3s all; border:1px solid #aaa; } .pagination-holder .item.active { color:#fff; background:#296E9D; text-shadow:0 0 10px #fff; } .pagination-holder .item:hover { color:#fff; background:#296E9D; } /*Site Header Start*/ #site-header { width:100%; padding:10px 0; background:#fff; z-index:9999999; border-bottom:1px solid #ddd; } #site-header .menu-bar{ display:flex; align-items:center; justify-content:space-between; } #site-header .menu-bar .logo { display:flex; align-items:center; } #site-header .menu-bar .logo img{ height:40px; margin-right:10px; } #site-header .menu-bar .logo .text { font-size:22px; font-weight:bold; } #site-header .menu-bar .logo .text span { } #site-header .menu-bar .menu { display:flex; align-items:center; font-size:16px; flex-direction:row-reverse; } #site-header .menu-bar .menu .item { transition:ease 0.3s all; border-radius:10px; color:#296E9D; position:relative; } #site-header .menu-bar .menu .item a { padding:5px 10px; display:flex; align-items:center; flex-direction:row-reverse; } #site-header .menu-bar .menu .item .icon { font-size:10px; margin-right:10px; } #site-header .menu-bar .menu .item:hover { color:#ED2024; } #site-header .menu-bar .menu .item.active { color:#fff; background:#296E9D; text-shadow: 0 0 20px #fff; } #site-header .menu-bar .menu .item:hover .sub-menu { display:block; } #site-header .menu-bar .menu .item .sub-menu { position:absolute; top:100%; right:0; width:200px; background:#fff; text-align:right; border:1px solid #ddd; display:none; transition:ease 0.3s all; z-index: 9; } #site-header .menu-bar .menu .item .sub-menu .item { border-radius:0; border:0; border-bottom:1px solid #ddd; } #site-header .menu-bar .mobile-menu { display:none; cursor:pointer; position:relative; text-align:right; } #site-header .menu-bar .mobile-nav { display:none; position:absolute; top:63px; height:calc(100vh - 62px); width:300px; background:#fff; right:0; overflow-y:auto; border-left:1px solid #ddd; } #site-header .menu-bar .mobile-nav .sub-menu { display:none; background:#f1f1f1; } #site-header .menu-bar .mobile-menu:hover { color:#296E9D; } #site-header .menu-bar .mobile-menu.active { color:#ED2024; } #site-header .menu-bar .mobile-nav .item { padding:10px; transition:ease 0.3s all; border-bottom:1px solid #ddd; display:flex; align-items:center; justify-content:space-between; flex-direction:row-reverse; color:#296E9D; cursor:pointer; } #site-header .menu-bar .mobile-nav .item:hover { color:#ED2024; } #site-header .menu-bar .mobile-nav .item.active { color:#fff; background:#296E9D; text-shadow: 0 0 20px #fff; } #media (max-width: 900px) { #site-header .menu-bar .menu { display:none; } #site-header .menu-bar .mobile-menu { display:block; } #site-header { position:fixed; top:0; left:0; } .header-space { margin-top:62px; } } /*Site Header End*/ /*Site Main Start*/ #main .top-carousel { width:100%; height:425px; display:flex; align-items:center; justify-content:center; flex-direction:column; } #main .top-carousel .slider1 { padding:0 100px; } #main .top-carousel .slider1 .item img { width:100%; height:200px; } #main .top-carousel .slider1 .item .text { text-align:center; height:59px; overflow:hidden; font-size:14px; background:#fff; border:1px solid #ddd; padding:0 5px; } #main .slider1 .owl-prev, .slider1 .owl-next { top:50%; transform:translateY(-64%); position:absolute; background:transparent !important; transition:all ease 0.3s; } #main .slider1 .owl-prev { left:0; margin-left:10px; } #main .slider1 .owl-next { right:0; margin-right:10px; } #main .slider1 .owl-prev:after, .slider1 .owl-next:after { font-family: "FontAwesome"; font-size: 148px; color:#D3D3D3; font-weight:bold; cursor:pointer; } #main .slider1 .owl-prev:after { content: '\f104'; } #main .slider1 .owl-next:after { content: '\f105'; } #main .qanda .carousel { max-width:100%; } #media (max-width: 900px) { #main .top-carousel .slider1 { padding:0 70px; } } #main .qanda .slider2 .item { text-align:center; font-size:16px; margin-bottom:10px; direction:rtl; } #main .qanda .slider2 .item .title { font-weight:bold; color:#fff; margin-bottom:20px; } #main .qanda .slider2 .item .desc { color:#aaa; } #main .qanda button { margin-top:40px !important; } #main .shadow-box .container .form-holder { background:#fff; border:2px solid #296E9D; border-radius:8px; padding:20px; } #main .shadow-box .form-holder .title { text-align:right; margin-bottom:10px; direction:rtl; } #main .shadow-box .form-holder form input, .shadow-box .form-holder form textarea { margin-bottom:5px; } #main .shadow-box .form-holder form textarea { height:90px; } #main .shadow-box .form-holder form .btn { color:#296E9D; background:#fff; } #main .shadow-box .form-holder form .btn:hover { background:#296E9D; color:#fff; } #main .books .container { flex-wrap:wrap; } #main .books .item-holder { padding:10px; width:calc(100% / 2); } #main .books .item { height:233px; display:flex; flex-direction:row-reverse; border:1px solid #aaa; float:right; } #main .books .item .cover { height:100%; width:200px; flex-shrink:0; float:right; } #main .books .item .info { padding:10px; display:flex; flex-align:center; justify-content:center; flex-direction:column; text-align:center; direction:rtl; } #main .books .item .info .title { font-size:20px; font-weight:bold; } #media (max-width: 900px) { #main .books .item-holder { width:calc(100% / 1); } } #main .bio .container .item-holder { padding:10px; width:calc(100% / 4); display:table; /* display: inline;*/ } #main .bio .container .item-holder .item { background:#fff; border:1px solid #aaa; padding:10px; } #main .bio .container .item-holder .item .cover { width:100%; height:200px; border:1px double #aaa; } #main .bio .container .item-holder .item .title { text-align:center; } /*Site Main End*/ /*Site About Start*/ #about { } #about .container .img { height:200px; width:200px; float:left; margin-right:10px; } #about .container .text { text-align:right; color:#000; direction:rtl; } /*Site About End*/ /*Site Mag Start*/ #mag .container { flex-wrap:wrap; } #mag .item-holder { padding:10px; width:calc(100% / 2); } #mag .item { height:233px; display:flex; flex-direction:row-reverse; border:1px solid #aaa; } #mag .item .cover { height:100%; width:200px; flex-shrink:0; } #mag .item .info { padding:10px; display:flex; flex-align:center; justify-content:center; flex-direction:column; text-align:center; direction:rtl; } #mag .item .info .title { font-size:20px; font-weight:bold; } #media (max-width: 900px) { #mag .item-holder { width:calc(100% / 1); } } /*Site Mag End*/ /*Site Library Start*/ #library .container { flex-wrap:wrap; } #library .item-holder { padding:10px; width:calc(100% / 2); } #library .item { height:233px; display:flex; flex-direction:row-reverse; border:1px solid #aaa; } #library .item .cover { height:100%; width:200px; flex-shrink:0; } #library .item .info { padding:10px; display:flex; flex-align:center; justify-content:center; flex-direction:column; text-align:center; direction:rtl; } #library .item .info .title { font-size:20px; font-weight:bold; } #media (max-width: 900px) { #library .item-holder { width:calc(100% / 1); } } /*Site Library End*/ /*Site Bio Start*/ #bio .container { flex-direction:row-reverse; flex-wrap:wrap; align-items:flex-start; justify-content:flex-start; } #bio .container .item-holder { padding:10px; width:calc(100% / 4); } #bio .container .item-holder .item { background:#fff; padding:10px; } #bio .container .item-holder .item .cover { width:100%; height:200px; border:1px double #aaa; } #bio .container .item-holder .item .title { text-align:center; } #media (max-width: 900px) { #bio .container .item-holder { padding:10px; width:calc(100% / 2); } } #media (max-width: 600px) { #bio .container .item-holder { padding:10px; width:calc(100% / 1); } } /*Site Bio End*/ /*Site Activities Start*/ #activities .container { flex-direction:row-reverse; align-items:flex-start; justify-content:flex-start; flex-wrap:wrap; } #activities .container .item-holder { width:calc(100% / 2); font-size:18px; padding:10px; } #activities .container .item-holder .item { text-align:right; padding:10px; } #activities .container .item-holder .item .title { font-weight:bold; max-height:68px; overflow:hidden; margin-bottom:5px; } #activities .container .item-holder .item .desc { max-height:100px; overflow:hidden; } #activities .container .item .img { width:100%; height:250px; } #media (max-width: 900px) { #activities .container .item-holder { width:calc(100% / 1); } } /*Site Activities End*/ /*Site Question Start*/ #question .container .text { text-align:right; margin-bottom:10px; direction:rtl; } #question .form-holder { text-align:left; } #question .form-holder .row { display:flex; flex-direction:row-reverse; } #question .form-holder .row .item { width:calc(100% / 2); margin-bottom:10px; } #question .form-holder .row .item:nth-of-type(1) { padding-left:5px; } #question .form-holder .row .item:nth-of-type(2) { padding-right:5px; } #question .form-holder textarea { width:100%; height:150px; margin-bottom:10px; } #question .form-holder .btn { color:#296E9D; background:#fff; } #question .form-holder .btn:hover { color:#fff; background:#296E9D; } /*Site Question End*/ /*Site Rulings Start*/ #rulings .container .item-holder { width:100%; margin-bottom:10px; } #rulings .container .item-holder .item { border:1px solid #aaa; text-align:right; padding:10px; direction:rtl; } #rulings .container .item-holder .item .title { font-weight:bold; margin-bottom:5px; } /*Site Rulings End*/ /*Site Footer Start*/ #site-footer { padding:10px 0; background:#fff; border-top:1px solid #ddd; } #site-footer .container { display:flex; align-items:center; } #site-footer .container > div { width:calc(100% / 2); } #site-footer .text { color:#296E9D; font-size:14px; text-align:left; } #site-footer .social { display:flex; align-items:center; justify-content:flex-end; } #site-footer .social .icon { color:#296E9D; display:flex; align-items:center; justify-content:center; font-size:20px; cursor:pointer; margin-left:20px; transition:ease 0.3s all; } #site-footer .social .icon:hover { color:#ED2024; } /*Site Footer End*/
You mention the layout twice in the configuration of your ListView. Use 'layout' => '{items}<div>{pager}</div>{summary}' A div has by default display: block;. Moreover, you can give it the class row if it still does not work.
SASS code problems
I've been trying to learn flexbox and I messed around with my codepen on mobile and something happened, I can't pin-point the problem but it keeps giving me an error and I can not for the life of me spot it! Everything seems fine. The code isn't amazing, I'm not great at coding yet, it's not DRY, it's messy, not very readable and whatever else but it was working. The page was working even with the error. Now it isn't doing anything at all, won't even load. There is an error in the CSS editor and I can not fix it! Please help me, it's really annoying me, I've been looking through it for hours changing things. Here is the codepen: http://codepen.io/joecox91/pen/GrJXQX Sorry I can't remember how to embed the codepen into the question! #import url('https://fonts.googleapis.com/css?family=Roboto+Mono:300,400'); * { padding:0; margin:0; text-decoration:none; box-sizing:border-box; } body, html { padding:0; margin:0; width:100%; height:100%; } header { background:#ffffff; border-bottom:1px solid #cccccc; } /* flex-flow: flex-direction flex-wrap */ .container { display:-webkit-flex; display:flex; justify-content:center; flex-flow: row wrap; } /* flex:flex-grow flex-shrink flex-basis */ .container section { height:auto; flex-grow:1; padding:20px 0; flex-shrink:1; flex-wrap:wrap; } .two { align-content:space-around; margin:40px 20px; font-family: 'Roboto Mono', monospace; } #content { padding:20px; width:60%; } #sidebar { background:black; width:20%; } // .container section:nth-child(2n) { // background:black; // } #header { display: flex; height:100%; align-items:center; justify-content: center; flex-flow:column wrap; font-family:helvetica; h1 { font-size:2em; letter-spacing:1.5px; } h2 { font-size:1.2em; } } #nav { display:flex; justify-content:center; align-items:center; a { padding:20px; color:#aaaaaa; font-family:helvetica; font-size:14px; margin-right:1px; text-transform:uppercase; border-bottom:2px solid white; transition:0.2s ease-out; &.active { border-bottom:2px solid black; color:black; } &:last-child { margin-right:0; margin-left:20px; border:1px solid #aaaaaa; border-radius:5px; &.active { border:1px solid black; } } &:hover { color:black; transition:0.2s ease-out; &:last-child { border:1px solid black; } } } } .spin1 { position:relative; animation:menutate 1.5s infinite; animation-timing-function: linear; top:-1px; left:10px; width:1px; border-top:5px solid rgba(0,0,0,0); border-right:5px solid white; border-left:5px solid white; border-bottom:5px solid rgba(0,0,0,0); background:black; } #mobile-menu { display:none; } #mobile-header { } #keyframes menutate { 0% { transform:rotate(0); } 100% { transform:rotate(360deg); } } #navi { display:none; } #media screen and (max-width:720px) { .container, .two, { flex-flow:column wrap; } #content { width:100%; } #sidebar { width:100%; } #navi { position:absolute; display:block; height:100%; top:0; left:0; background:deepskyblue; width:80%; transform:translate(-100%); z-index:10000; } #navi.extend { box-shadow:0px 0px 10px 10px rgba(0,0,0,0.4); } #header { justify-content:flex-end; align-items:flex-end; padding-right:20px; h1 { padding:0; margin:0; } } #nav { display:none; } .mobile-hide { display:none; } body { position:relative; transform:translate(0); transition:0.3s ease-out; } body.extend { transform:translateX(80%); transition:0.3s ease-out; } #mobile-menu { position:fixed; top:22px; left:20px; display:block; height:50px; overflow:none; width:50px; padding:8px; z-index:500000; transition:0.2s ease; filter: opacity(1); &.extend { transform:translateX(-180%); transition:0.4s ease; } &:hover { cursor:pointer; transition:0.5s ease; filter:opacity(0.6); } span { position:absolute; height:4px; background:black; width:40px; text-align:center; transition:0.5s ease; &.menu-animate { transition:0.5s ease; } &:hover { cursor:pointer; } &:last-child { border:none; font-size:12px; background:none; height:auto; width:40px; top:38px; text-align:center; } &:nth-child(1) { top:8px; &.menu-animate { top:13px; transform:rotate(45deg); } } &:nth-child(2) { top:18px; &.menu-animate { top:13px; transform:rotate(-45deg); } } &:nth-child(3) { top:28px; &.menu-animate { top:13px; filter:opacity(0); } } } } } There is the SASS, or half SASS. The problem I'm getting is: Invalid CSS after "... position:fixed": expected "{", was ";" This makes no sense to me! Why would it be expecting an opening curly bracket anywhere? After position:fixed... What is going on? Send help! Thank you
The issue is that you have some strange spacing characters on few lines of your SCSS - this is tripping up Sass. If you replace those with proper spaces things seem to work: #import url('https://fonts.googleapis.com/css?family=Roboto+Mono:300,400'); * { padding:0; margin:0; text-decoration:none; box-sizing:border-box; } body, html { padding:0; margin:0; width:100%; height:100%; } header { background:#ffffff; border-bottom:1px solid #cccccc; } /* flex-flow: flex-direction flex-wrap */ .container { display:-webkit-flex; display:flex; justify-content:center; flex-flow: row wrap; } /* flex:flex-grow flex-shrink flex-basis */ .container section { height:auto; flex-grow:1; padding:20px 0; flex-shrink:1; flex-wrap:wrap; } .two { align-content:space-around; margin:40px 20px; font-family: 'Roboto Mono', monospace; } #content { padding:20px; width:60%; } #sidebar { background:black; width:20%; } // .container section:nth-child(2n) { // background:black; // } #header { display: flex; height:100%; align-items:center; justify-content: center; flex-flow:column wrap; font-family:helvetica; h1 { font-size:2em; letter-spacing:1.5px; } h2 { font-size:1.2em; } } #nav { display:flex; justify-content:center; align-items:center; a { padding:20px; color:#aaaaaa; font-family:helvetica; font-size:14px; margin-right:1px; text-transform:uppercase; border-bottom:2px solid white; transition:0.2s ease-out; &.active { border-bottom:2px solid black; color:black; } &:last-child { margin-right:0; margin-left:20px; border:1px solid #aaaaaa; border-radius:5px; &.active { border:1px solid black; } } &:hover { color:black; transition:0.2s ease-out; &:last-child { border:1px solid black; } } } } .spin1 { position:relative; animation:menutate 1.5s infinite; animation-timing-function: linear; top:-1px; left:10px; width:1px; border-top:5px solid rgba(0,0,0,0); border-right:5px solid white; border-left:5px solid white; border-bottom:5px solid rgba(0,0,0,0); background:black; } #mobile-menu { display:none; } #mobile-header { } #keyframes menutate { 0% { transform:rotate(0); } 100% { transform:rotate(360deg); } } #navi { display:none; } #media screen and (max-width:720px) { .container, .two, { flex-flow:column wrap; } #content { width:100%; } #sidebar { width:100%; } #navi { position:absolute; display:block; height:100%; top:0; left:0; background:deepskyblue; width:80%; transform:translate(-100%); z-index:10000; } #navi.extend { box-shadow:0px 0px 10px 10px rgba(0,0,0,0.4); } #header { justify-content:flex-end; align-items:flex-end; padding-right:20px; h1 { padding:0; margin:0; } } #nav { display:none; } .mobile-hide { display:none; } body { position:relative; transform:translate(0); transition:0.3s ease-out; } body.extend { transform:translateX(80%); transition:0.3s ease-out; } #mobile-menu { position:fixed; top:22px; left:20px; display:block; height:50px; overflow:none; width:50px; padding:8px; z-index:500000; transition:0.2s ease; filter: opacity(1); &.extend { transform:translateX(-180%); transition:0.4s ease; } &:hover { cursor:pointer; transition:0.5s ease; filter:opacity(0.6); } span { position:absolute; height:4px; background:black; width:40px; text-align:center; transition:0.5s ease; &.menu-animate { transition:0.5s ease; } &:hover { cursor:pointer; } &:last-child { border:none; font-size:12px; background:none; height:auto; width:40px; top:38px; text-align:center; } &:nth-child(1) { top:8px; &.menu-animate { top:13px; transform:rotate(45deg); } } &:nth-child(2) { top:18px; &.menu-animate { top:13px; transform:rotate(-45deg); } } &:nth-child(3) { top:28px; &.menu-animate { top:13px; filter:opacity(0); } } } } } Here's the Codepen with the fix. I recommend using an editor with "Show Invisibles" turned on so you can easily see issues like this.
How come in Safari my image won't float to the left of my paragraph
My website loads fine in Chrome, but in Safari my image won't float to the left of my article. Here is a look at the CSS: body { background-color:white; font-family: 'Josefin Slab', serif; } .top_portion { width:820px; height:200px; background-color:#e2e2e2; margin:auto; text-align:center; border-top:5px; border-bottom:5px; border-left:0px; border-right:0px; border-style:solid; border-color:#30474b; } .top_portion img { padding-top:0px; } #welcome h1 { margin-top:0px; text-align:center; padding:0px; margin-bottom:0px; } #welcome h3 { margin:0px; text-align:center; } #welcome { margin:auto; background-color:#e2e2e2; width:820px; } #navigation { text-align:center; } #navigation li { list-style-type:none; display:inline;; } ul { font-size:20px; margin:0; } ul a { padding-right:20px; text-decoration:none; color:black; } a:hover { color:#888eee; } This is the div containing the image and the article .info { width:820px; margin:auto; background-color:#e2e2e2; overflow:hidden; } Here is the image .info img { padding-top:6px; padding-left:5px; } And here is the article this is and the .info img above should be next to each other but they aren't in Safari which has been updated to the latest version. article { padding-left:5px; font-family:sans-serif; text-indent:15px; width:600px; float:right; background-color:#e2e2e2; display:inline-block; text-align:justify; } article h2 { font-family: 'Carme', sans-serif; margin-top:5px; } h5 { padding:0; margin:0; } a { color:black; } #bottomlink { font-size:1.5em; text-align:center; } #bottomlink a { text-decoration:none; }
float:left; for the img and don't bother float:right; on the article
Safari Browser ignoring zIndex
I have a small problem on a web page (http://goldschmiede-h-j-baier.de/dev/index.php?id=10) everything is displayed correctly, the footer is pushed upwards with z-index. but safari does the z-index does not and I do not know why. the footer is always placed behind the main container ... /*Website*/ html,body { background:#000; font-family:"Trebuchet MS",Helvetica,Jamrul,sans-serif; color:#fff; overflow:hidden; border-left: 5px solid; border-right: 5px solid; } .maincontainer { overflow:auto; height:100%; width: 100%; } #footer { height:64px; position:fixed; bottom:30px; z-index:200; } #navigation { position:fixed; left:30%; } #logo { background:url(../images/logo-baier.png); width:217px; height:75px; position:fixed; bottom:30px; z-index:202; left:10%; } #social { position:fixed; right:0; top:30px; z-index:302; } /*Slider*/ #slides { position:relative; } .slides { background:#000; /*margin-top:10px;*/ border-bottom: 10px solid #fff; border-top: 10px solid #fff; } #slides .slides-container { display:none; } #slides .scrollable { *zoom:1; position:relative; top:0; left:0; overflow-y:auto; -webkit-overflow-scrolling:touch; height:100%; } #slides .scrollable:after { content:""; display:table; clear:both; } .slides-navigation { margin:0 auto; position:absolute; z-index:3; top:56%; width:100%; } .slides-navigation a { position:absolute; display:block; } .slides-navigation a.prev { left:0px; } .slides-navigation a.next { right:0px; } .slides-pagination { position:absolute; z-index:3; bottom:0; text-align:center; width:100%; } .slides-pagination a { border:2px solid #222; border-radius:15px; width:10px; height:10px; display:-moz-inline-stack; display:inline-block; vertical-align:middle; *vertical-align:auto; zoom:1; *display:inline; background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGP6zwAAAgcBApocMXEAAAAASUVORK5CYII="); margin:2px; overflow:hidden; text-indent:-100%; } .slides-pagination a.current { background:#222; } .next { width:35px; height:55px; background-image:url("../images/str.png"); background-position:42px -44px; } .prev { width:35px; height:55px; background-image:url("../images/str.png"); background-position:-7px -44px; } .slides-pagination { display:none; } .bottom { position:absolute; z-index:3000; bottom:90px; width:100%; right:-60%; } .bottom a { width:51px; height:32px; background-image:url("../images/str.png"); background-position:0px 0px; display:inline-block; } .top { position:absolute; z-index:3000; top:0; text-align:center; width:100%; margin-top: 10px; } .top a { width:51px; height:32px; background-image:url("../images/str.png"); background-position:-68px 0px; display:inline-block; }
Drop Down not even showing up in IE6
I've got a drop down menu here that just plain won't show up in IE6. The site works perfectly in every other browser. Seems daft to lose sleep over IE6, I know, but the site is for a demographic who could very well still be using it. Here's the CSS: html { height:100%; } body, p, a, ul, li, ol, h1, h2, h3, h4, h5, h6 { margin:0; padding:0; } body { behavior:url("csshover3.htc"); font-size:14px; font-family:Arial, Helvetica, sans-serif; background-color:#d3d3d3; height:100%; } h1 { font-size:18px; color:#752eca; text-decoration:none; } h2 { font-size:14px; color:#909090; text-decoration:none!important; } p { text-indent:20px; color:#000; } p a { color:#000; text-decoration:underline; } p.foot { text-indent:0px; } p.link { font-size:18px; color:#30F; text-decoration:underline!important; } a { color:#4d2288; text-decoration:none; outline:none; } a:visited { color:#4d2288; } p a:hover { text-decoration:underline!important; } ul#nav { padding:5px; margin:0px auto; width:100%; } ul#nav li a { display:block; font-weight:bold; padding:2px 10px; background:#bacddb; } ul#nav li a:hover { background:#888; color:#fff; } li { list-style:none; float:left; position:relative; width:225px; text-align:center; margin:0px auto; margin-right:4px; border:1px solid #4d2288; } li ul { display:none; position:relative; width:auto; top:0; left:0; margin-left:-1px; } li>ul { top:auto; left:auto; border-top:none; } li:hover ul, li.over ul { display:block; } ul#nav li.current a { background:#b8ab28; } ul#nav li.current a:hover { background:#888; } img { margin:10px 0 5px; } *html img { margin:20px; } .coltextimg { position:relative; float:left; background-position:left bottom; padding:0px 20px 10px 0px; border:none; } #maincontent { width:940px; margin:0px auto; postition:absolute; } *html #maincontent { margin-left:42px; } #header { float:left; width:100%; height:auto!important; height:100%; min-height:100%; margin:0px auto; background-image:url(images/banner_test.jpg); background-repeat:no-repeat; border:2px solid #752eca; -webkit-border-top-left-radius:10px; -webkit-border-top-right-radius:10px; -moz-border-radius-topleft:10px; -moz-border-radius-topright:10px; border-top-left-radius:10px; border-top-right-radius:10px; } .colmask { position:relative; margin-top:160px; clear:both; float:left; width:100%; overflow:hidden; } .colright, .colmid { float:left; width:100%; position:relative; } .col1, .col2 { float:left; position:relative; padding:10px 0 1em 0; overflow:hidden; } .twocol { background:#fff; } .twocol .colmid { right:45%; background:#fff; } .twocol .col1 { width:51%; left:47%; text-align:justify; z-index:0; } .twocol .col2 { width:41%; left:51%; text-align:justify; z-index:0; } .twocol .colimg { border:2px solid #a0a0a0; } .twocol .colvid1 { width:360px; height:240px; } .twocol .colvid2 { width:360px; height:240px; } #footer { text-align:center; font-size:9px; padding:10px 0 1em 0; clear:both; width:100%; height:100%; } *html #footer { height:43px; } #footer p a { text-decoration:none; } #lyr_ddmenu { position:absolute; z-index:1; height:10px; top:120px; float:left; width:1000px; margin:0px auto; padding:5px; } #contact { position:absolute; float:right; font-size:10px; } A.Controls:link { color:#666666; text-decoration:none; font-weight:bold; } A.Controls:visited { color:#666666; text-decoration:none; font-weight:bold; } A.Controls:active { color:#666666; text-decoration:none; font-weight:bold; } A.Controls:hover { color:#be0000; text-decoration:none; font-weight:bold; } And here's the html I'm having the specific problem with: <div id="maincontent"> <div id="header"> <div id="lyr_ddmenu"> <ul id="nav"> <li class="current"><href here...</a> <ul class="sub"> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> </ul></li> <li><href here...</a></li> <ul class="sub"> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> </ul></li> <li><href here...</a></li> <li><href here...</a></li> <ul class="sub"> <li><href here...</a></li> </ul></li> </ul> </div> Thanks!
IE6 does not support the :hover pseudo-class for all elements, only a tags, so the following rule will not get applied in IE6: li:hover ul, li.over ul { display:block; } It looks like your menus are designed to use Javascript to emulate :hover by adding the class over to the li elements using the mouseover functions, so you'll need to post any Javascript before anyone can diagnose what's going on in IE6. Just on the off chance that this might help, you can use the Whatever:hover script to emulate this behavior in IE6.
1) Remove behavior:url("csshover3.htc"); from the body 2) Add this to the bottom (better replacement of the .htc) * html li { scrollbar-face-color: expression(runtimeStyle.scrollbarFaceColor = '#fff', onmouseover = function() {this.className += ' hover'}, onmouseout = function() {this.className = this.className.replace(/ hover/g, '')} ); } li.hover ul { display:block; } /* (li:hover) */ 3) Should work. or try to separate li:hover ul { display:block; } li.over ul { display:block; } You can also use jQuery to handle :hover jQuery(function($) { $("li").bind('mouseover mouseout',function(){$(this).toggleClass('hover')}); }); play around .hover class: li.hover ul { _display: block; } /* Styles for IE6 */