Bootstrap 3.1.1 Media Queries Reversed? - css

I have been experiencing an odd and really frustrating problem with certain page elements (use h1.brand different em sizes are being ignored as one example) that won't down size at responsive break points and even increase in size despite modified CSS using traditional Media Queries. When using Google Chrome developer tools it will show these elements as following the opposite or at least incorrect media query for a given screen size.
Help, I've searched and tried many different fixes with no luck,
Thanks for any help,
TVprodDude
Site is Live at tvadpros.com
Below is a couple of the media queries – placed at top of master css stylesheet - Maybe I have something wrong here:
#media (min-width: 480px) {
.container {
width: 440px;
margin-right: auto;
margin-left: auto;
}
h1.brand {
font-size: 2em;
padding-left: 20px;
padding-right: 20px;
}
}
/* Small Devices (tablets, 768px and up) */
#media (min-width: 768px) {
.container {
width: 720px;
margin-right: auto;
margin-left: auto;
}
.column {
/* float: left; */
margin-right: 10px;
margin-left: 10px;
}
h1.brand {
font-size: 3em;
padding-left: 20px;
padding-right: 20px;
}
/* .row {
overflow: hidden;
} */
ul.sdt_menu {
/*margin-left:500px; */
padding: 0;
list-style: none;
font-family:"Myriad Pro", "Trebuchet MS", sans-serif;
font-size:12px;
width: 640px;
}
ul.sdt_menu a{
text-decoration:none;
outline:none;
}
ul.sdt_menu li{
float:left;
width:100px;
height:45px;
position:relative;
cursor:pointer;
}
ul.sdt_menu li > a{
position:absolute;
top:0px;
left:0px;
width:100px;
height:45px;
z-index:12;
background:transparent url(../images/overlay.png) no-repeat bottom right;
-moz-box-shadow:0px 0px 2px #000 inset;
-webkit-box-shadow:0px 0px 2px #000 inset;
box-shadow:0px 0px 2px #000 inset;
}
ul.sdt_menu li a img{
border:none;
position:absolute;
width:0px;
height:0px;
bottom:0px;
left:45px;
z-index:100;
-moz-box-shadow:0px 0px 4px #000;
-webkit-box-shadow:0px 0px 4px #000;
box-shadow:0px 0px 4px #000;
}
ul.sdt_menu li span.sdt_wrap{
position:absolute;
top:15px;
left:0px;
width:100px;
height:45px;
z-index:15;
}
ul.sdt_menu li span.sdt_active{
position:absolute;
background:#111;
top:45px;
width:100px;
height:0px;
left:0px;
z-index:14;
-moz-box-shadow:0px 0px 4px #000 inset;
-webkit-box-shadow:0px 0px 4px #000 inset;
box-shadow:0px 0px 4px #000 inset;
}
ul.sdt_menu li span span.sdt_link,
ul.sdt_menu li span span.sdt_descr,
ul.sdt_menu li div.sdt_box a{
margin-left: 8px;
text-transform:uppercase;
text-shadow:1px 1px 1px #000;
}
ul.sdt_menu li span span.sdt_link{
color:#fff;
font-size: 15px;
float:left;
clear:both;
}
ul.sdt_menu li span span.sdt_descr{
color:#f5f5f5;
float:left;
clear:both;
width:95px; /*For dumbass IE7*/
font-size: 9px;
letter-spacing:1px;
}
ul.sdt_menu li div.sdt_box{
display:block;
position:absolute;
width:100px;
overflow:hidden;
height:140px;
top:65px;
left:0px;
display:none;
background:#000;
}
ul.sdt_menu li div.sdt_box a{
float:left;
clear:both;
line-height:25px;
color:#0B75AF;
}
ul.sdt_menu li div.sdt_box a:first-child{
margin-top: 9px;
}
ul.sdt_menu li div.sdt_box a:hover{
color:#fff;
}
/* img.size-chg {
width: 140px;
height: 140px; */
}
/* End nav menu for min 768px width */
/* Medium Devices, Desktops, 992px and up */
#media (min-width: 992px)

Related

How can I FIX/CHANGE the almost invisible Menu Items in my Website's Mobile Version? (Used to be fine then Weebly made changes)

BACKGROUND
Years ago, I built my first Weebly website for my business ( www.smehelper.com )
The mobile version 'used to' look great!
SINCE THEN
However... Weebly made some changes a year or so ago ( I don't know what ),
since then, regardless of what CSS I've tried in an attempt to overide things, I can't seem to make it change.
NOOB APOLOGIES
Apologies if I'm using wrong terminology, I work in Marketing for a living and specialise in Lead Generation, however, I love to learn various items.
www.smehelper.com
SOURCE CODE
The following is ALL the CSS. Apologies for being a noob - Let me know if there's any other code/files you need 👍
ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, body, html, p, blockquote, fieldset, input{margin:0; padding:0}
ul{list-style:none}
fieldset{border:0}
img{
/*box-shadow: 2px 2px 7px #AAAAAA;*/
/*-webkit-box-shadow: 4px 2px 7px #AAAAAA;*/
/*16px=1em*/
}
html{width:100%}
body{
width:100%;
margin:0;
padding:0;
background-color:#eeeded;
font-family:Trebuchet MS,sans-serif;
/*font-size:14px;*/
color:#eeeded;
/*background: url(bodybg1400x790_planks.jpg);*/
background:url("Swansea-Marketing-Consultant-Workshops-1280x1024.jpg") top no-repeat fixed; /* top center no-repeat fixed */
background-size: 100% auto;
}
/* #bg{ */
/* background:url("Swansea-Marketing-Consultant-Workshops-1280x1024.jpg") top center no-repeat fixed;*/
/* } */
blockquote{
margin: 5px 0;
padding-left: 10px;
border-left: 7px solid orange !important;
font: normal 1.3em;
/*font-size:1.2em;
font-style: normal !important;
font: font-style font-variant font-weight font-size/line-height font-family|caption|icon|menu|message-box|small-caption|status-bar|initial|inherit;*/
line-height: 160%;
}
blockquote em {
/*font: #ffcc00 !important;*/ /*orange*/
/*font-style: bold !important;
font-size: 1.4em !important;*/
font: bold 1.4em #ffcc00 !important;
}
/*.thought via https://codepen.io/quadbaup/pen/rKOKQv (also in GglDrv_growth-dev_*/
a img{border:0}
a{text-decoration: underline; color:#4db7c8;}
.clear{clear:both}
p{line-height:130%; color:#eeeded; font-size:14px; padding-bottom:10px}
em, ul em {
color:#ffcc00;/*yellow*/
}
h1{font-size:24px; font-weight:bold; color:#4db7c8; margin:0px 0px 10px 0px}
h2{
font-family:arial,sans-serif;
font-size:18px;
line-height:130%;
font-weight:normal;
letter-spacing:2px;
color:#ffc000; /*orig-turqiouse: #4db7c8*/ /*cccccc=Orig grey SW chose OR ffbc66=orange equiv of h2:first-line OR ffc000=warm-bright-yellow */
margin:18px 0px 2px 0px; /*12px 0px 12px 0px*/
/*background-color:yellow;*/
}
h2:bold {
font-size:11px;
color:#4B4B4B;
font-weight: normal;
text-transform:uppercase;
letter-spacing:-3px;
padding: 8px 0px 0px 0px;
}
/*
h2 a:link {
color:white;
text-decoration:none;
/*line-height:150%;*/
/*}*/
/*h2 a:visited {*/
/*color:white;*/
/*}*/
h2 a:hover {
color:white;
text-decoration:underline;
}
h2 a:active {
text-decoration:underline;
/*background-color:yellow;*/
}
h2:first-line {
text-transform:uppercase;
font-size:1.5em; /*SW's orig 18px pre feb'14 - 16px=1em - pre march 15: 1.3em*/
/*font-variant: small-caps; /*pre mar'15=normal*/
line-height:150%; /*pre mar'15=130%*/
color:#66ccff;/*lime: #9dc205*/
letter-spacing:normal;
}
#header{
position:fixed;
top:0px; left:0px;
width:980px;
height:auto;
margin:0pt;
padding:0pt;
border:1px solid green;
background:pink;
}
#line {position:fixed; width:100%; height:125px; margin-top:60px; background:transparent url(navbg.png) repeat-x; z-index:2; border:1px solid green;}
#wrapper { /* this is the header to footer but not whole site background */
position:relative;
z-index:2;
width:980px;
height:100%/*150px*/;
margin:0pt auto;
}
.logo {
z-index:1000;
position:fixed;
top:0px; /*left:0px;*/
margin:0px auto;
width:980px; height:125px;/*width:980px; height:165px;*/ /*Area independent of Nav.*/
background:url("small-business-helper-digital-marketing-for-UK-small-businesses-80pc-30pc.png") no-repeat left center; /*fyi.logo is 980x118*/
/*background:url("small-business-helper-holistic-e-business-consultancy.png") no-repeat left center; /*fyi.logo is 980x118*/
/*background-color:black; opacity:0.50; -moz-opacity:92; filter:alpha(opacity=95);*/ /*use shaded header png instead*/
}
.logo a{
/*display:block;*/
width:100%; height:100%;/*set clickable area*/
text-indent:-9999px;
overflow:hidden;
}
#telephone { /*for right hand side div element*/
float: right;
width: 500px;
font-family: Georgia, "Times New Roman", Times, serif;
color: white;
font-size: 14px;
text-align: right;
}
#telephone .number { /*for addressing class:number within right hand side div telephone element*/
font-size: 34px;
}
#telephone #email a {
text-transform: uppercase;
color: white;
text-decoration: none;
font-size: 15px;
line-height: 24px;
}
.navContainer{ /*FULL WIDTH BAR*/
z-index:5;
position:fixed; top:125px; left:0;
height:35px /*50px*/; width:100%; /*aligns whole nav elements*/
/*margin:2px auto;*/
background:url("shadow1.png");
}
.frame{/*frame for nav area*/
/*width:980px; height:55px;*/
width:980px; height:35px; /*width:980px; height:173px;*/
margin:0px auto/*4px auto 0px auto*/;
/*border:1px solid purple;*/
}
.wsite-mobile-menu {
background: url(theme/shadow1.png?1645107290);!important
}
.wsite-mobile-menu .wsite-menu-mobile-arrow {
color: red; !important
<!-- border: none; -->
<!-- width: 16px; -->
<!-- height: 16px; -->
<!-- top: 5px; -->
<!-- left: 0; -->
<!-- background: url(theme/shadow1.png?1645107290) top left no-repeat; -->
background: url(theme/shadow1.png?1645107290);!important
<!-- background-size: 16px 16px; -->
}
.wsite-mobile-menu li a {
<!-- font-weight: 300; -->
color: red;!important
<!-- padding: 15px; -->
<!-- font-size: 16px; -->
<!-- border-bottom: 1px solid #111 !important; -->
<!-- text-shadow: 0 1px 0 rgb(0 0 0 / 70%); -->
<!-- box-shadow: inset 0 0 1px rgb(255 255 255 / 20%), inset 0 1px 2px rgb(255 255 255 / 10%); -->
background: url(theme/shadow1.png?1645107290);!important
}
.wsite-mobile-menu li a {
<!-- font-size: 1em; -->
<!-- line-height: 1.5; -->
<!-- padding: 8px 10px; -->
<!-- color: white; -->
<!-- text-decoration: none; -->
<!-- display: block; -->
cursor: pointer;
-webkit-tap-highlight-color: blue;!important
}
.wsite-mobile-menu a:hover, #active a{
background-repeat:repeat-x;!important
background-position:0 100%;!important
color:blue/*txt hover color*/;!important
}
.mainNav{ /*actual nav textual area*/
width:980px; /*changing this width wraps all main nav bullet elements*/
font:14px Arial,sans-serif;
color:#fff;
/*margin:0px; */
/*background:url("weebly-menu.png") no-repeat -9999px -9999px;*/
margin:0px auto;
/*border:1px solid red;*/
}
/*when changing all nav height change line-height also.*/
.mainNav a{
display:inline-block;
color:white;
text-decoration:none;
padding:0px 13px;
width:auto;
height:34px;
line-height:34px/*42px*/; /*this aligns the nav text elements vertically*/
margin:0px auto;
background:transparent url("MainNavActive.png") no-repeat -9999px -9999px;
/*border:1px solid red;*/
/*background-color:black; opacity:0.92; -moz-opacity:92; filter:alpha(opacity=95);*/
}
.mainNav a:hover, #active a{
background-repeat:repeat-x;
background-position:0 100%;
color:#00a1b4/*txt hover color*/;
}
.mainNav ul{
margin:0 auto;
list-style:none;
background:url("bullet-weebly-menu.png") no-repeat -9999px -9999px;
}
.mainNav li{
float:left;
}
.mainNav ul li.weebly-nav-more{
background:none;
} /*unsure of usage*/
#weebly-menus .weebly-menu-wrap{
position:absolute; top:25px; left:70%;
width:250px; /*use to set + constrain width for drop downs*/
margin:0px;
/*background:black; opacity:0.85; -moz-opacity:92; filter:alpha(opacity=95);*/ /*initial excess blocks upon initial expansion*/
}
#weebly-menus span.weebly-menu-more{ /*controls the 'more arrows' i.e.>. */
height:100% /*39px*/;
Margin:auto 0px;
padding:auto 0px;
}
#weebly-menus .weebly-menu{
margin:0;
list-style:none;
}
#weebly-menus .weebly-menu li{
float:none; /*controls float/alignment from one sub item to the next e.g.vertical v left=horizontal*/
clear:none;
width:100%; /*sets background width of drop downs*/ vertical-align:top;
}
#weebly-menus .weebly-menu li a{/*this is the actual drop down backgrounds in total*/
font:12px Arial,sans-serif; color:#fff; text-decoration:none;
display:block;
border:0 none;
background:black; /*background:url("bullet-weebly-menu.png") no-repeat 10px 100%*/
width:auto; /*sets text area*/
line-height:15px; height:auto; min-height:18px;
padding:14px 20px 10px 20px;
}
#weebly-menus .weebly-menu li a:hover, #weebly-menus .weebly-menu li.weebly-nav-current a{
background:#003366 /*#336699 #006666 #009999 #00a1b4*/ /*url("bullet-weebly-menu.png") no-repeat 30px */; /*blue hover background on sub-menu*/
/*background:#003366/*#336699/*#006666/*#009999/*#00a1b4*/ /*url("bullet-weebly-menu.png") no-repeat 30px ;*/ /*30px /*50%*/
}
#weebly-menus span.weebly-menu-title{display:inline; padding:0px;}
/* START MOBILE - MOBILE BURGER-MENU & BACKGROUND DROP-DROWN */
/* DESIGN GOAL: DOWN(dark). Standard: White Font. Hover: Blu Background highlight. Slect: Blue Font.*/
/* END MOBILE */
#container{position:relative; z-index:1; width:980px;}
.sliderContainer{width:980px; min-height:200px; height:auto; max-height:400px; overflow:hidden; padding:0px 0px 0px 0px; /*margin-bottom:17px;*/ /*background: url("sliderShadow.png") no-repeat 50% 100%*/}
.sliderContainer-noheader{padding-top:100px;}
.sliderContainer-short{padding-top:125px; width:980px; min-height:200px; height:auto; max-height:400px; overflow:hidden;}
#slider-tall{ position:center; width: 980px;height: 400px; overflow: hidden}
.wsite-header{ width:980px; height:200px; background:url(%%HEADERIMG%%) no-repeat; margin:0px 0px 0px 0px }
#slider-short{ position:center; width: 980px;height: 200px; overflow: hidden}
#slider-medium{ position:center; width: 980px;height: 250px; overflow: hidden}
#slider-home{ position:center; width: 980px;height: 250px; overflow: hidden}
#bar{position:relative; width:980px; height:45px;/*height:50px;*/ margin:4px 0px 2px 0px; background:transparent url(headerbg.png) repeat-x; /*margin-top:25px*/}
#bar-short{position:relative; width:980px; height:45px;/*height:50px;*/ background:transparent url(headerbg.png) repeat-x; border:1px solid green;}#bar-short{position:relative; width:980px; height:50px;/**/ background:transparent url(headerbg.png) repeat-x; border:1px solid green;}
#sitename{float:left; /*width:810px;*/ padding:10px;/*padding:13px 0px 0px 15px;*/ color:#eeeded; font-family:Georgia; font-style:italic; font-weight:bold; text-align:left; font-size:19px; letter-spacing:0.1em; /*background-color:red; opacity:0.50; -moz-opacity:50; filter:alpha(opacity=50);*/}
.clearfix:after{content:"."; clear:both; display:block; height:0; visibility:hidden}
* html .clearfix{/*height:1%*/}
.framer{/*float:right;*/}
#viewcart{float:right; padding:14px 10px 0px 10px; /*background-color:yellow; opacity:0.50; -moz-opacity:50; filter:alpha(opacity=50);*/}
#social{float:right; padding:8px; /*background-color:blue; opacity:0.50; -moz-opacity:50; filter:alpha(opacity=50); margin:-21 10 0 0;*/}
#social li{float:right; /*floats individual elements alongside each other*/list-style-type:none}
#social li a{display:block; margin:0 3px; padding:0; height:30px; width:30px; text-indent:-9999px}
#social li a#rssf{background:url(rss.png) no-repeat top left}
#social li a#rssf:hover{background-position:bottom left}
#social li a#fb{background:url(facebook.png) no-repeat top left}
#social li a#fb:hover{background-position:bottom left}
#social li a#mail{background:url(mail.png) no-repeat top left}
#social li a#mail:hover{background-position:bottom left}
#social li a#twitter{background:url(twitter.png) no-repeat top left}
#social li a#twitter:hover{background-position:bottom left}
#social li a#linkedin{background:url(linkedin.png) no-repeat top left}
#social li a#linkedin:hover{background-position:bottom left}
#content_container{position:relative; z-index:1; width:980px; margin:0px auto;}
#contentbg{position:relative; width:980px; height:auto !important; min-height:300px; background:transparent url(contentbg-98pc-prplGrad.png) repeat-y}
#content{position:relative; width:940px; height:auto !important; min-height:300px; padding:20px 20px 20px 20px}
#footerbg {position:relative; width: 980px; height:60px; background:transparent url(footerbg.png) repeat; margin:4px 0px 20px 0px; padding:10px 0px;}
#footer {position:relative; width:940px; /*height:80px;*/ /*text-align:right;*/ background: url(footerbg.png) repeat; margin:4px 0px 30px 0px; padding:15px 20px 0px 20px;/*border:green 1px solid;*/}
#footer li{}
#footer a{color:#a2a1a0; text-decoration:underline;}
#footer a:hover{color:orange;}
#footer .weebly-footer a{color:#e6e6e6; border:green 1px solid;}
/**************plugin for index.html Layout start HERE*******************************************/
.flash_slider{
width:980px;
height:300px;
overflow:hidden;
/* margin:250px 0px 0px 0px;*/
/* orig margin-left:-7px;*/
/*background:green;*/
}
/***************Splash Page and Landing page CSS Starts Here *************************************/
/*************** START Stick Contact Tab ******************************/
/* http://mojotech.github.io/stickymojo/ */
#sticky-contact-tab {
width: 120px;
background-color: #ccc;
min-height: 200px;
margin: 10px 0 15px 0; /*controls the cutoff of the top and bottom limitations*/
padding: 15px 10px;
float: left; /* float right for a right aligned sidebar */
}
/*************** END Stick Contact Tab ******************************/
WHAT I TRIED
I tried overiding various css elements using !important
I'm guessing, either:
a) I've incorrect css-selection
or
b) I need to add HTML scripts
or
c) It's not doable via Weebly's Manual CSS
EXAMPLE:-
.wsite-mobile-menu a:hover, #active a{
background-repeat:repeat-x;!important
background-position:0 100%;!important
color:blue/*txt hover color*/;!important
}
🤷‍♀️
Your example is using !important incorrectly. In CSS, the !important must come before the semi-colon, e.g. background-repeat: repeat-x !important;. This appears to be why your styles are not applying.
If you replace your code with the following, you should see the difference:
.wsite-mobile-menu a:hover, #active a{
background-repeat:repeat-x!important;
background-position:0 100%!important;
color:blue/*txt hover color*/!important;
}
As for actually making things more visible, it took a while to find what menu items you were referring to, but I believe you're talking about these:
In this example, I've just overridden color to make them stand out a bit more.
You should be able to get the same result with .wsite-mobile-menu a { color: #000 !important }.

Toggle for Phone View

I have toggle code but it doesn't manifest on a phone view. If I delete the max-width 750px it then appears but that messes up the comp view. So I can't have both the comp and phone view correct at the same time as my code is written now. https://citizenssalon.com
<!-- Header -->
<nav class=menu>
<nav class=title>CitizensSalon
<ul class="active">
<link href="Policy.html">
<link href="Writings.html">
<link href="Projects.html">
<li>Blog</li>
<li>Policy Proposals</li>
<li>Projects</li>
</ul>
</nav>
<a class="toggle-nav" href="#">☰</a>
</nav>
CSS Code
/*----- Toggle Button -----*/
.toggle-nav {
display:none;
}
/*----- Comp View Full Screen -----*/
#media screen and (max-width: 1150px)
{
.wrap {
width:90%;
}
.title {
margin-bottom: 5px;
}
}
/*----- Menu -----*/
#media screen and (min-width: 950px) {
.menu {
width:100%;
box-shadow:0px 1px 1px rgba(0,0,0,0.15);
border-radius:3px;
background-color:cadetblue;
border: 10px;
}
.salon {
font-size: 5px;
margin-bottom: 10px;
}
.title {
font-size:30px;
}
.menu ul {
display:inline-block;
}
.menu li {
margin:0px 50px 0px 0px;
float:left;
list-style:none;
font-size:17px;
margin-top: 10px;
}
.menu li:last-child {
margin-right:0px;
}
.menu a {
text-shadow:0px 1px 0px rgba(0,0,0,0.5);
color:black;
transition:color linear 0.15s;
font-size:20px;
}
.menu a:hover .menu .current-item a {
text-decoration:none;
color:#66a992;
}
#media screen and (max-width: 970px) {
.search-form input {
width:120px;
}
}
#media screen and (max-width: 750px) {
.menu {
position:relative;
display:block;
background-color:cadetblue;
}
.menu ul.active {
display:none;
}
.menu ul {
width:20%;
position:absolute;
top:10%;
right:10px;
padding:10px 10px;
box-shadow:0px 1px 1px rgba(0,0,0,0.15);
border-radius:3px;
background:aliceblue;
}
.menu ul:after {
width:0px;
height:0px;
position:absolute;
top:0%;
right:22px;
content:'';
transform:translate(0%, -100%);
border-left:7px solid transparent;
border-right:7px solid transparent;
border-bottom:2px solid #303030;
}
.menu li {
margin:5px 0px 5px 0px;
float:none;
display:block;
}
.menu a {
display:inline;
}
.toggle-nav {
padding:10px;
float:none;
display:inline-block;
box-shadow:0px 1px 1px rgba(0,0,0,0.15);
border-radius:3px;
background:white;
text-shadow:0px 1px 0px rgba(0,0,0,0.5);
color:black;
font-size:30px;
transition:color linear 0.15s;
}
.toggle-nav:hover .toggle-nav .active {
text-decoration:none;
color:#66a992;
}
.search-form {
margin:12px 0px 0px 20px;
float:left;
}
.search-form input {
box-shadow:-1px 1px 2px rgba(0,0,0,0.1);
}
}
.menu {
text-align: center;
border-radius: 2px;
}
.title {
display: inline-block;
border-top: 5px solid black;
border-radius: 0px;
font-size: 5.5rem;
color:azure;
font-family:monospace;
}
You forgot to close your first #media declaration with a }, so all your CSS code is inside of #media screen and (max-width: 1150px)
Here's the fixed CSS:
/*----- Toggle Button -----*/
.toggle-nav {
display:none;
}
/*----- Comp View Full Screen -----*/
#media screen and (max-width: 1150px)
{
.wrap {
width:90%;
}
.title {
margin-bottom: 5px;
}
}
/*----- Menu -----*/
#media screen and (min-width: 950px) {
.menu {
width:100%;
box-shadow:0px 1px 1px rgba(0,0,0,0.15);
border-radius:3px;
background-color:cadetblue;
border: 10px;
}
.salon {
font-size: 5px;
margin-bottom: 10px;
}
.title {
font-size:30px;
}
.menu ul {
display:inline-block;
}
.menu li {
margin:0px 50px 0px 0px;
float:left;
list-style:none;
font-size:17px;
margin-top: 10px;
}
.menu li:last-child {
margin-right:0px;
}
.menu a {
text-shadow:0px 1px 0px rgba(0,0,0,0.5);
color:black;
transition:color linear 0.15s;
font-size:20px;
}
.menu a:hover .menu .current-item a {
text-decoration:none;
color:#66a992;
}
}
#media screen and (max-width: 970px) {
.search-form input {
width:120px;
}
}
#media screen and (max-width: 750px) {
.menu {
position:relative;
display:block;
background-color:cadetblue;
}
.menu ul.active {
display:none;
}
.menu ul {
width:20%;
position:absolute;
top:10%;
right:10px;
padding:10px 10px;
box-shadow:0px 1px 1px rgba(0,0,0,0.15);
border-radius:3px;
background:aliceblue;
}
.menu ul:after {
width:0px;
height:0px;
position:absolute;
top:0%;
right:22px;
content:'';
transform:translate(0%, -100%);
border-left:7px solid transparent;
border-right:7px solid transparent;
border-bottom:2px solid #303030;
}
.menu li {
margin:5px 0px 5px 0px;
float:none;
display:block;
}
.menu a {
display:inline;
}
.toggle-nav {
padding:10px;
float:none;
display:inline-block;
box-shadow:0px 1px 1px rgba(0,0,0,0.15);
border-radius:3px;
background:white;
text-shadow:0px 1px 0px rgba(0,0,0,0.5);
color:black;
font-size:30px;
transition:color linear 0.15s;
}
.toggle-nav:hover .toggle-nav .active {
text-decoration:none;
color:#66a992;
}
.search-form {
margin:12px 0px 0px 20px;
float:left;
}
.search-form input {
box-shadow:-1px 1px 2px rgba(0,0,0,0.1);
}
}
.menu {
text-align: center;
border-radius: 2px;
}
.title {
display: inline-block;
border-top: 5px solid black;
border-radius: 0px;
font-size: 5.5rem;
color:azure;
font-family:monospace;
}

Block with the goods "dropped" under the unit categories

This is my problem:
If i used standart pictures and description (like picture 1) - i have good appearance of the site. But when I use the data from the database, the block catalog moves down the left (picture 2).
The code is the same in both cases, but the appearance is very different
#wrapper {
margin-top:40px;
width: 1200px;
margin: 0 auto;
height: auto !important;
}
#category
{
padding:10px 10px 10px 20px;
border-left: 1px solid #d9d9d9;
border-right: 1px solid #d9d9d9;
border-bottom: 1px solid #d9d9d9;
width:200px;
clear:both;
display:block;
}
#category ul li{
word-wrap: break-word;
list-style-image: url(/neoshop/images/check.png);
padding:10px 0px 10px 10px;
border-bottom:1px dotted #cccccc;
}
#category ul li:last-child{
border-bottom:0px dotted #cccccc;
}
#category ul li a{
font:15px/1.3 "Arial", Arial,Helvetica, sans-serif;
margin-top:0px;
font-weight:100;
display:block;
color:#2f3638;
text-decoration:none;
line-height:20px;
}
#category ul li a:hover{
color:#0bb1e8;
}
#category ul ul a{
list-style-image:none;
color:#8b8b8b;
background:#fff;
}
#category ul ul{
margin-top:5px;
display:none;
color:#8b8b8b;
background:#fff;
}
#category ul ul li{
word-wrap: break-word;
list-style-image: none;
padding:10px 0px 10px 10px;
border-bottom:1px dotted #cccccc;
}
.catalog
{
margin-left:12px;
float:left;
width:948px;
}
.product-main
{
width:236px;
height:285px;
float:left;
}
.product{
border-right:1px dotted #cccccc;
padding:0 15px;
}
.product h2{
color:#111017;
text-align:center;
font:bold 14px/1.3 Tahoma;
margin:0 0 15px 0;
}
.product h3{
color:#111017;
text-align:center;
font:bold 12px/1.3 Tahoma;
margin:0 0 15px 0;
}
.product-img{
text-align:center;
}
.product-img img{
weight:114px;
height:112px;
}
.price{
font:13px/1.3 "Arial", Arial,Helvetica, sans-serif;
color:#0bb1e8;
}
.price span{
font:13px/1.3 "Arial", Arial,Helvetica, sans-serif;
color:#111017;
text-align:center;
}
.price a{
clear:both;
float:right;
}
.bot-dot
{
border-bottom:1px dotted #cccccc;
margin:20px;
}
.product-main:nth-child(4n) .product
{
border-right:none;
}
.product-main:last-child .product
{
border-right:none;
}
.product-main:nth-child(4n) .bot-dot
{
margin: 20px 0 20px 20px;
}
.product-main:nth-child(4n+1) .bot-dot
{
margin: 20px 20px 20px 0px;
}
It must be like this:
But i have this:
when the actual images are being loaded,
the total width of your catalog increases more than 948px and so it has to move to next line.
in
.product-img img{
weight:114px;
height:112px;
}
instead of width you have specified weight by mistake

My website is not fitting to each screen resolution of pc

Hello i have created a website in 3 months using HTML, CSS, Jquery and PHP.
for design and layout i have used CSS, after building this website i have noticed that
Whenever i m opening my website in small screens so there is need of width scroll to see
whole page especially the language dropdown selection in right corner of page.
in my CSS i have used PX for divs such as wrapper, header and etc
Someone told me to use Percentage instead of PX, but i have reached to end.
First guys what i should do to solve this problem?
Second is there any way to convert from PX to Percentage.
.wrapper
{
width:1320px;
height:760px;
border:solid 1px #000;
margin:0 auto;
background:url(images/Background_Image.jpg) no-repeat;
}
.wrapper .logo
{
background:url(images/logo.png) no-repeat bottom;
width:360px;
height:180px;
margin-left:345px;
margin-top:10px;
float:left;
}
.wrapper .language
{
float:right;
background-color:#006;
padding:5px 10px;
border-radius:4px;
-webkit-border-radius:4px;
-moz-border-radius:4px;
-ms-border-radius:4px;
-o-border-radius:4px;
border:#00AEEF;
color: #FFFFFF;
font:bold 1.2em "Calibri";
margin:0px 0px 0px 0px;
cursor:pointer;
text-align:center;
}
.wrapper .language a
{
color:#FFF;
text-decoration:none;
font:"calibiri";
}
.wrapper .search_property
{
width:300px;
height:500px;
margin-right:58px;
margin-top:80px;
float:right;
}
.wrapper .search_property .title
{
background:url(images/protitle.fw.png) no-repeat;
width:295px;
height:80px;
margin-bottom:10px;
float:left;
text-align:center;
color:#FFF;
font: bold 1.7em "Calibri";
}
.wrapper .search_property .province
{
background:url(images/proprovince.fw.png) no-repeat;
width:295px;
height:70px;
float:left;
margin-bottom:10px;
text-align:center;
}
/* start design for the province */
select
{
width:195px;
margin-top:23px;
padding:3px 3px 3px 46px;
font: bold 1em "Calibri";
-webkit-border-radius:1px;
-moz-border-radius:1px;
border-radius:1.3px;
-webkit-box-shadow: 0 3px 0 #ccc, 0 -1px #fff inset;
-moz-box-shadow: 0 3px 0 #ccc, 0 -1px #fff inset;
box-shadow: 0 3px 0 #ccc, 0 -1px #fff inset;
background: #f6f6f8;
color:#000;
border:none;
outline:none;
display: inline-block;
-webkit-appearance:none;
-moz-appearance:none;
appearance:none;
cursor:pointer;
}
option
{
text-align:center;
}
/* Targetting Webkit browsers only. FF will show the dropdown arrow with so much padding. */
#media screen and (-webkit-min-device-pixel-ratio:0) {
select {padding-right:18px}
}
.la
{
position:relative;
}
.la:after {
content:'<>';
font:11px "Consolas", monospace;
color:#000;
-webkit-transform:rotate(90deg);
-moz-transform:rotate(90deg);
-ms-transform:rotate(90deg);
transform:rotate(90deg);
right:8px; top:2px;
padding:0 0 2px;
border-bottom:1px solid #ddd;
position:absolute;
pointer-events:none;
}
.la:before {
content:'';
right:3.5px;
top:-1px;
width:25px; height:22px;
background:#ccc;
position:absolute;
pointer-events:none;
display:block;
}
/* end design for the province */
.wrapper .search_property .district
{
background:url(images/prodistrict.fw.png) no-repeat;
width:295px;
height:70px;
float:left;
margin-bottom:10px;
text-align:center;
}
.wrapper .search_property .propertystatus
{
background:url(images/prostatus.fw.png) no-repeat;
width:295px;
height:90px;
float:left;
margin-bottom:10px;
color:#FFF;
padding:20px 0 0 0;
}
radio
{
cursor:pointer;
}
.wrapper .search_property .probutton
{
width:270px;
height:50px;
float:left;
margin-bottom:3px;
padding:0 0 0 25px;
}
.wrapper .search_property .postprobutton
{
width:285px;
height:40px;
float:left;
margin-top:5px;
padding:0 0 0 10px;
}
#Submitbutton
{
background: #006 url(images/a.fw.png) no-repeat right;
padding:5px 15px;
border-radius:4px;
width:233px;
-webkit-border-radius:4px;
-moz-border-radius:4px;
-ms-border-radius:4px;
-o-border-radius:4px;
border:#00AEEF;
color: #FFFFFF;
font:bold 1.5em "Calibri";
margin:0px 0px 0px 0px;
cursor:pointer;
text-align:left;
}
#pypbutton
{
background: #006 url(images/Property%20List.png) no-repeat right;
padding:5px 15px;
border-radius:4px;
-webkit-border-radius:4px;
-moz-border-radius:4px;
-ms-border-radius:4px;
-o-border-radius:4px;
border:#00AEEF;
color: #FFFFFF;
font:bold 1.4em "Calibri";
margin:0px 0px 0px 0px;
cursor:pointer;
text-decoration:none;
}
.wrapper .slideshow
{
width:395px;
height:264px;
margin-left:325px;
margin-top:24px;
float:left;
}
.wrapper .menu
{
width:412px;
height:20px;
margin-left:327px;
margin-top:40px;
float:left;
}
.wrapper .menu .aboutus
{
width:68px;
height:18px;
color:#fff;
font: 1em Arial, Helvetica, sans-serif;
margin:0px 5px 0px 0px;
cursor:pointer;
float:left;
border-right:#039 solid 3px;
}
.wrapper .menu .myaccount
{
width:85px;
height:18px;
color:#fff;
margin:0px 5px 0px 0px;
font: 1em Arial, Helvetica, sans-serif;
cursor:pointer;
float:left;
border-right:#039 solid 3px;
}
.wrapper .menu .services
{
width:65px;
height:18px;
color:#fff;
font: 1em Arial, Helvetica, sans-serif;
margin:0px 5px 0px 0px;
cursor:pointer;
float:left;
border-right:#039 solid 3px;
}
.wrapper .menu .career
{
width:54px;
height:18px;
color:#fff;
font: 1em Arial, Helvetica, sans-serif;
margin:0px 5px 0px 0px;
cursor:pointer;
float:left;
border-right:#039 solid 3px;
}
.wrapper .menu .contactus
{
width:87px;
height:18px;
color:#fff;
font: 1em Arial, Helvetica, sans-serif;
margin:0px 5px 0px 0px;
cursor:pointer;
float:left;
}
.wrapper .footer
{
background:url(images/footerbg.jpg) bottom;
width:1120px;
height:155px;
margin-top:15px;
float:left;
margin-left:100px;
}
.wrapper .footer .footer_in
{
width: 900px;
height: auto;
margin: auto;
padding: 14px 0px 0px 0px;
}
.wrapper .footer .footer_in .footer_navigation
{
/*width:412px;*/
height:128px;
float:left;
font-size:11px;
background:url(images/border.jpg) right no-repeat;
font: 1em "Calibri";
width:350px;
}
.wrapper .footer .footer_in .footer_navigation .fn_heading
{
width:310px;
font: 1em "Calibri";
color:#fff;
height:37px;
font-size:12px;
background:url(images/footerimg.png) no-repeat;
padding-left:10px;
line-height:24px;
}
.wrapper .footer ..footer_in .footer_navigation ul {
float:left;
width:320px;
padding-left:9px;
}
.wrapper .footer .footer_in .footer_navigation li {
float:left;
width:127px;
background:url(images/listimg.gif) no-repeat left;
padding-left:12px;
display:block;
padding-bottom:4px;
}
.wrapper .footer .footer_in .footer_navigation li a
{
color:#fff;
text-decoration:none;
}
.wrapper .footer .footer_in .footer_navigation li a:hover {
text-decoration:underline;
}
.wrapper .footer .footer_in .copyright
{
background: url(images/border.gif) no-repeat scroll right center transparent;
color: #FFFFFF;
float: left;
font: 1em "Calibri";
min-height: 94px;
padding-left: 14px;
padding-right: 30px;
padding-top: 35px;
}
.wrapper .footer .footer_in .copyright a
{
padding-bottom:5px;
color:#fff;
text-decoration:none;
}
.wrapper .footer .footer_in .copyright a:hover
{
text-decoration:underline;
}
.wrapper .footer .footer_in .footer-add
{
text-align:center;
width:220px;
float:right;
margin-left:10px;
font: 1em "Calibri";
}
.wrapper .footer .footer_in .footer-add a
{
color:#fff;
background:url(images/link_for_scale-new_03.png) no-repeat bottom;
height:122px;
display:block;
}
Check your monitor resolution (By the CSS, my guess is that it is 1440x768).
Now do this math with every pixel value: ("Pixel Width Value"/1440)*100 and ("Pixel Height Value"/768)*100.
That is your value in %!
Some elements might not work properly, but it's a good way to start.
There are also other units that can work depending on the screen size
check one of them here.
However I think % might be the best for you to start out.

Css Transition For My Home Made Nav

I have created a nav menu myself for my website, I'm no expert but I think the menu turned out great ... I would like for my the menus to open a little slower then instant, maybe have a .5s transition ... I have tried to implement myself but I just don't seem to be able to figure it out .... I have created a jsfiddle to show my nav bar ... I was hoping to someone could show me how to had a transition to all the drop down menus if its possible ... Thank You
jsfiddle : http://jsfiddle.net/vRdEp/ (its a little broken on here)
my site : www.curious-howto.com
My css:
ul#navitemul {
border-radius: 0px 20px 20px 20px;
margin:0px!important;
width:500px;
}
.belownav {
top:0px;
left:183px;
position:absolute;
z-index:100;
box-shadow: 0 0 10px #000 inset;
border-radius: 5px 0px 0px 5px;
padding:20px!important;
background:#282828!important;
}
.navitem a {
margin-right: 10px;
border: 1px solid #424242!important;
text-overflow:ellipsis;
display:block;
overflow:hidden;
border-radius:5px;
width:200px!important;
padding:0px!important;
float:left;
height:40px;
background:#424242!important;
}
.navitem a:hover {
border:1px solid #585858!important;
background:#000!important;
}
img.fl {
float:left;
}
span.marleft {
letter-spacing:1px;
font-size:12px!important;
text-decoration:none;
color:white!important;
margin-left:15px!important;
line-height:38px;
}
li.marright{
float:left!important;
margin-bottom:10px!important;
margin-right:10px!important;
}
.ontop{
color:white;
font-size:28px!important;
margin-bottom:20px!important
}
ul#loginmenu {
border-radius:0px 0px 30px 30px;
z-index:1000;
left:200px;
width:500px!important;
overflow:auto;
max-height:600px;
left:-100px!important;
}
li.logo {
margin:0px!important;
line-height:10px!important;
border-radius: 30px 0px 0px 0px;
padding:10px 40px 10px 40px!important
}
span#navlogo {
font-size:20px;
}
#menu{
position:relative;
top:10px;
width:80%;
max-width:750px;
min-width:660px;
height:47px;
border-radius: 30px 30px 0px 0px;
background-color:#172322;
margin:0px;
padding:0px;
list-style:none;
color:#fff;
display:inline-block;
float:right;
z-index:1000;
}
#menu a {
color:#fff;
text-decoration:none;
}
#menu > li {
transition:width 2s, height 2s;
-webkit-transition:width 2s, height 2s, -webkit-transform 2s;
/* Safari */padding: 13px 0px;
background:#172322 none repeat scroll 0 0;
cursor:pointer;
float:left;
position:relative;
}
#menu > li a:hover {
color:#B0D730;
}
#menu .logo {
background-color: #7cb7e3;
width:87px;
padding:0px;
}
/* sub-menus*/
#menu ul {
padding:0px;
margin:0px;
display:block;
display:inline;
}
#menu li ul {
position:absolute;
left:-24px;
top:0px;
margin-top:45px;
line-height:16px;
background-color:#172322;
color:#0395CC;
/* for IE */ display:none;
}
#menu li:hover ul {
display:block;
}
#menu li ul li{
display:block;
margin:5px 20px;
padding: 5px 0px;
list-style-type:none;
}
#menu li ul li:first-child {
border-top: none;
}
#menu li ul li a {
display:block;
color:#0395CC;
}
#menu li ul li a:hover {
color:#7FCDFE;
}
/* main submenu */
#menu #main li {
text-align:center;
margin:10px 10px 10px 10px!important
}
#menu #main {
border-radius: 0px 0px 30px 30px;
width:167px;
left:0px;
top:-20px;
padding-top:20px;
background-color:#7cb7e3;
color:#fff;
z-index:999;
}
/* search */
.searchContainer div {
background-color:#fff;
display:inline;
padding:5px;
}
.searchContainer input[type="text"] {
border:none;
}
.searchContainer ul {
vertical-align:middle;
}
The problem is that transitions animate a property when that property changes. For example, if I had a div that was 100px wide, then added a class to it that switched it to be 300px wide, you could set transition: width 3s and it would grow over that 3 second period.
In your case, all that's changing is display:block / display:hidden
To get it to transition, you'll need to change things so that, rather than hiding it with display:hidden, you're hiding it by shrinking it to be really tiny and growing, or changing the opacity, etc.

Resources