How to fix my CSS to make a responsive layout? - css

I designed the page with left side navigation, which on the full screen looks fine, however, when I resize it to mobile size, my main content stays in one column and does not fill up full viewport- leaving quite an empty space on the left.
I believe something in media queries might be causing this.
Here is a link: https://codepen.io/sweexee/pen/abvqyOY
Let me know if you can see it and CSS:
/* Typography imported from Google Fonts */
header {
font-family: "Taviraj", serif;
color: #257ecc;
}
p,
a {
font-family: Taviraj, serif;
}
/*Generic styles*/
html {
scroll-behavior: smooth;
}
html,
body {
min-width: 290px;
background-color: #ffffff;
line-height: 1.5;
}
body {
margin: 8px;
display: block;
}
a {
background-color: #257ecc;
text-decoration: none;
color: white;
text-align: center;
display: inline-block;
transition: all 0.3s;
}
a:hover {
opacity: 0.8;
color: #cc4d47;
}
p {
font-weight: 300;
font-size: 1.2rem;
}
blockquote {
border-left: 10px solid #257ecc;
margin: 1.5em 10px;
padding: 0.5em 10px;
}
blockquote:before {
color: #257ecc;
content: open-quote;
font-size: 4em;
line-height: 0.1em;
margin-right: 0.25em;
vertical-align: -0.4em;
}
blockquote p {
display: inline;
font-weight: 400;
font-style: italic;
font-size: 1.5rem;
color: #cc4d47;
}
ul {
display: block;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
padding-inline-start: 40px;
}
li {
display: list-item;
}
/* Navigation styles*/
nav {
display: block;
}
#navbar {
position: fixed;
min-width: 290px;
top: 0px;
left: 0px;
width: 300px;
height: 100%;
background-color: #257ecc;
border-right: solid;
border-color: #828e99;
}
#media only screen and (max-width: 815px) {
#navbar {
max-height: 275px;
border: none;
border-bottom: 2px solid;
position: absolute;
width: 100%;
z-index: 1;
top: 0;
padding: 0;
margin: 0;
}
}
nav > header {
color: #ffffff;
margin: 10px;
text-align: center;
font-size: 1.9rem;
font-weight: 600;
display: block;
}
#navbar ul {
padding: 0;
height: 80%;
overflow-y: auto;
overflow-x: hidden;
}
#media only screen and (max-width: 815px) {
#navbar ul {
border: 1px solid;
height: 207px;
}
}
#navbar ul > li {
color: #ffffff;
border-top: 1px solid;
border-color: #cc4d47;
list-style: none;
position: relative;
width: 100%;
}
#navbar a {
display: block;
padding: 12px 30px;
text-decoration: none;
cursor: pointer;
font-size: 1.1rem;
font-family: "Roboto", sans-serif;
font-weight: 300;
}
/*Main ccontent styles*/
main {
display: block;
}
#main-doc {
position: absolute;
margin-left: 310px;
padding: 20px;
margin-bottom: 110px;
}
#media only screen and (max-width: 400px) {
#main-doc {
margin-left: -10px;
}
}
#media only screen and (max-width: 815px) {
#main-doc {
position: relative;
margin-top: 270px;
}
}
/* Section styling*/
section {
display: block;
}
#main-doc header {
display: block;
font-size: 1.6rem;
font-weight: 600;
text-align: left;
margin: 0px;
padding-top: 10px;
}
section article {
color: #3d4247;
margin: 15px;
}
article {
display: block;
}
section article > p {
display: block;
}
section article > img {
display: block;
max-width: 100%;
height: auto;
margin-left: auto;
margin-right: auto;
margin-top: 20px;
}
section article > ul {
list-style: none;
}
section article > ul li::before {
content: "\2022";
color: #257ecc;
font-weight: bold;
display: inline-block;
width: 1em;
margin-left: -1em;
}
section article > ul > li {
font-family: "Taviraj", sans-serif;
font-size: 1.2rem;
font-weight: 300;
color: #3d4247;
}
section article > ul > li > a {
color: #257ecc;
background-color: #ffffff;
}

Add margin-left: 0; in the #main-doc in #media only screen and (max-width: 815px)
width media query as below
With margin-left reflection: 310px; # main-doc moves to the right even in the mobile width of the contents.
#media only screen and (max-width: 815px)
#main-doc {
position: relative;
margin-left: 0; /* *** add this *** */
margin-top: 270px;
}
After adding, your site will look like the following when the mobile width

Your #main-doc has margin-left: 310px;.
Remove this in your media query concerning (max-width: 815px) and you're good!

Related

how do I make it so my mobile responsive works on my web page?

I am trying to make my page mobile responsive but something is off. I had to change position of my nav-menu from absolute to relative for nav menu to go to the right top corner but now im having issues with the responsive part as well as the collapse of menu. i have been in tutorial hell trying to understand relative and absolute. I thought I had it but this proves i do not
/* make for mobile*/
.mobile-nav-toggle {
position: fixed;
right: 15px;
top: 15px;
z-index: 9998;
border: 0;
background: none;
font-size: 24px;
transition: all 0.4s;
outline: none !important;
line-height: 1;
cursor: pointer;
text-align: right;
}
.mobile-nav-toggle i {
color: #ffff;
}
.mobile.nav {
position: fixed;
top: 55px;
right: 15px;
bottom: 15px;
z-index: 0;
overflow-y: auto;
background: rgba(0,0,0,0.7);
}
The rest of the script :
body {
font-family: "open sans",sans-serif;
background-color: #040404;
color: #fff;
position: relative;
background: transparent;
}
body::before {
content: "";
position: fixed;
background: #040404;
left: 0;
background-size: cover;
right: 0;
top: 0;
height: 100vh;
z-index: -1;
}
#media (min-width: 1024px){
body::before {
background-attachment: fixed;
}
}
a {
color: #18d26e;
}
a:hover {
color: #18d26e;
text-decoration: none;
}
h1,h2,h3,h4,h5,h6 {
font-family: "Railewa", sans-serif;
}
/*==========Header=======*/
#header {
transition: ease-in-out 0.3s;
position: relative;
height: 100vh;
display: flex;
align-items: center;
z-index: 997;
overflow-y: auto;
}
#header * {
transition: ease-in-out 0.3s;
}
#header h1 {
font-size: 48px;
margin: 0;
padding: 0;
line-height: 1;
font-weight: 700;
font-family: "poppins",sans-serif;
}
#header h1 a,
#header h1 a:hover {
color: #fff;
line-height: 1;
display: inline-block;
}
header h2 {
font-size: 24px;
margin-top: 20px;
color: rgba(255,255,255,0.8);
}
#header h2 span {
color: #fff;
border-bottom: 2px solid #18d26e;
padding-bottom: 6px;
}
#header h2 span:hover {
color: #ffff;
border-bottom: 2px solid #ff28f4;
padding-bottom: 6px;
}
#header .social-links {
margin-top: 40px;
display: flex;
}
#header .social-links a {
font-size: 16px;
display: flex;
justify-content: center;
align-items: center;
background: rgba(255, 255, 255,0.1);
color: #ffff;
line-height: 1;
margin-right: 8px;
border-radius: 50%;
width: 40px;
height: 40px;
}
#header .social-links a:hover {
background: #18d26e;
}
/*make it resposive*/
#media (max-width:992px) {
#header h1 {
font-size: 36px;
}
#header h2 {
font-size: 20px;
line-height: 30px;
}
#header .social-links {
margin-top: 15px;
}
#header .container {
display: flex;
flex-direction: column;
align-items: center;
}
}

Issue with Ghost theme at my work website - sidebar is not mobile responsive

I've been ask at work to fix an issue with our website.I didn't created it so I have to understand what cause this bug but some help will be appreciate.
In Screen PC, the website is working fine ; on mobile when you click to open the sidebar, you click on Services, the submenu opens fine :
But when you click below on Industries, this it what appears :
I download the theme installed on Ghost and check the css file, I think there and issue with bootstrap but I'm not sure...
If someone can give me some tips or idea - Let me know if should put some code here of this portion.
Thank you
enter code here
/*------INDUSTRIES-SUBMENU------*/
#content-desktop {display: block;}
#content-mobile {display: none;}
#media screen and (max-width: 768px) {
#industries-submenu ul{
padding: 0;
margin: 20px 0 40px 0;
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: flex-start;
position: relative;
}
#industries-submenu ul li{
width: 25%;
margin-top: 20px;
padding-right: 30px;
}
#content-desktop {display: none;}
#content-mobile {display: block;}
#industries-submenu ul li a{
color: #1a2c47;
font-size: 16px;
font-weight: 700;
}
#industries-submenu ul li ul{
margin: 10px 0 0 0;
}
#industries-submenu ul li ul li{
margin-bottom: 10px;
width: 100%;
margin-top: 0;
}
#industries-submenu ul li ul li a{
color: #4f5661;
font-size: 14px;
font-weight: 600;
}
}
/*===== 2. INDUSTRIES =====*/
.breadcrumbs-blog .breadcrumb-item.active:last-child:before{
content: 'Blog';
margin-left: 4px;
display: block;
color: #1a2c47;
}
#breadcrumb-section{
border-top: 1px solid #f0f0f0;
padding: 25px 0 50px 0;
}
.breadcrumb{
background-color: transparent;
padding: 0;
margin: 0;
}
.breadcrumb .breadcrumb-item{
padding: 0;
}
.breadcrumb li a{
color: #0e50b2;
font-size: 14px;
font-weight: 700;
}
.breadcrumb li a:after{
width: 5px;
height: 8px;
content: '';
display: inline-block;
background-image: url('../img/icon-arrow-small.svg');
margin: 0 5px 1px;
}
.breadcrumb-item+.breadcrumb-item::before{
display: none;
}
.breadcrumb-item.active {
color: #1a2c47;
font-weight: 600;
font-size: 14px;
display: flex;
line-height: 22px;
align-items: flex-end;
}
#page-content .post-title{
font-size: 40px;
font-weight: 800;
line-height: 48px;
margin-bottom: 20px;
}
#page-content .featured-image{
max-width: 100%;
height: auto;
margin-bottom: 20px;
}
.editor-content h1,
.editor-content h2,
.editor-content h3,
.editor-content h4,
.editor-content h5,
.editor-content h6{
font-weight: 700;
margin-bottom: 20px;
margin-top: 50px;
}
.editor-content h1{
font-size: 36px;
line-height: 48px;
}
.editor-content h2{
font-size: 32px;
line-height: 38px;
}
.editor-content h3{
font-size: 28px;
line-height: 34px;
}
.editor-content h4{
font-size: 24px;
line-height: 28px;
}
.editor-content h5{
font-size: 18px;
line-height: 30px;
}
.editor-content h6{
font-size: 14px;
line-height: 24px;
}
.editor-content p{
font-size: 18px;
font-weight: 400;
line-height: 30px;
}
.editor-content a:not(.btn){
text-decoration: underline;
}
.editor-content ul,
.editor-content ol{
padding-left: 20px;
margin: 0;
}
.editor-content ul li{
list-style-type: disc;
font-size: 18px;
line-height: 30px;
margin-bottom: 10px;
}
.editor-content ol li{
font-size: 18px;
line-height: 30px;
margin-bottom: 10px;
}
.editor-content img{
max-width: 100%;
height: auto;
}
.editor-content table{
width: 100%;
margin: 30px 0;
background-color: transparent;
}
.editor-content td,
.editor-content th {
padding: .75rem;
vertical-align: top;
border-top: 1px solid #dee2e6;
}
.editor-content .table-holder{
width: 100%;
overflow: auto;
}
/*-----SIDEBAR-----*/
.sidebar{
overflow: hidden;
}
.sidebar .sidebar-get-a-quote{
background-color: #082e69;
position: relative;
padding: 60px 20px;
text-align: center;
background-image: url('../img/sidebar-illustration-1.svg');
background-position: center bottom;
background-repeat: no-repeat;
border-radius: 3px;
}
.sidebar .sidebar-get-a-quote .get-a-quote-info{
position: relative;
z-index: 2;
}
.sidebar .sidebar-get-a-quote .get-a-quote-info h3{
color: #ffffff;
font-size: 24px;
font-weight: 700;
line-height: 32px;
margin-bottom: 25px;
}
.sidebar .sidebar-get-a-quote .get-a-quote-info .btn{
font-size: 18px;
}
.sidebar .sidebar-associated-links{
background-color: #f8f8f8;
padding: 25px 20px;
}
.sidebar .sidebar-associated-links h3{
font-size: 18px;
font-weight: 700;
line-height: 30px;
margin-bottom: 20px;
}
.sidebar .sidebar-associated-links ul{
margin: 0;
}
.sidebar .sidebar-associated-links ul li{
margin-bottom: 15px;
}
.sidebar .sidebar-associated-links ul li:last-child{
margin-bottom: 0;
}
.sidebar .sidebar-associated-links ul li a{
line-height: 26px;
font-size: 14px;
color: #0e50b2;
display: block;
}
.sidebar .list-boxed .parent{
width: 100%;
margin-bottom: 0;
}
.sidebar .list-boxed li ul li{
border-bottom: 1px solid #ededed;
}
.sidebar p,
.sidebar ul li,
.sidebar ol li{
font-size: 16px;
line-height: 26px;
}
.widget{
margin-bottom: 30px;
}
.widget h3{
font-weight: bold;
margin-bottom: 20px;
}
.sidebar .latest-posts{
border-top: 1px solid #e5e5e5;
padding-top: 30px;
margin: 0;
}
.sidebar .latest-posts li a{
display: block;
margin-bottom: 20px;
text-decoration: underline;
}
.sidebar .latest-posts li:last-child a{
border: none;
}
#big-get-a-quote{
margin-top: 100px;
padding: 120px 0;
background-color: #082e69;
background-image: url('../img/big-get-a-quote.png');
background-position: center bottom;
background-repeat: no-repeat;
color: #fff;
text-align: center;
font-size: 18px;
font-weight: 400;
line-height: 30px;
}
#big-get-a-quote h3{
font-size: 36px;
font-weight: 400;
line-height: 48px;
color: #fff;
font-weight: bold;
margin-bottom: 25px;
}
#big-get-a-quote p:first-of-type{
font-size: 24px;
line-height: 34px;
}
#big-get-a-quote .btn{
margin: 50px auto 0;
}
.editor-content img,
.editor-content .kg-width-full img,
.editor-content .kg-width-wide img{
max-width: 100%;
height: auto;
position: relative;
margin: 0;
border-radius: 5px;
}
.editor-content .kg-gallery-container {
display: flex;
flex-direction: column;
margin: 10px auto;
position: relative;
left: 50%;
transform: translateX(-50%);
z-index: 5;
}
.editor-content .kg-gallery-row {
display: flex;
flex-direction: row;
justify-content: center;
}
.editor-content .kg-gallery-image img {
display: flex;
object-fit: cover;
margin: 0;
width: 100%;
height: 100%;
}
.editor-content .kg-gallery-row:not(:first-of-type) {
margin: 10px 0 0 0;
}
.editor-content .kg-gallery-image:not(:first-of-type) {
margin: 0 0 0 10px;
}
.editor-content figcaption{
padding: 10px 15px;
font-size: 14px;
border-bottom: 1px solid #ededed;
}
.loop .post{
display: flex;
margin-bottom: 30px;
}
.loop .post .post-inner-content{
width: 100%;
position: relative;
overflow: hidden;
}
.loop .inner{
position: relative;
}
.post .img-holder {
overflow: hidden;
border-radius: 5px;
margin-bottom: 10px;
}
.post .img-holder .featured-image{
display: block;
width: 100%;
position: relative;
background-repeat: no-repeat;
background-position: center;
background-size: cover;
}
.post .img-holder .featured-image:before{
display: block;
content: '';
width: 100%;
padding-bottom: 75%;
}
#page-content .post .img-holder .featured-image{
margin: 0;
}
.post .inner-featured-image{
margin-bottom: 30px;
}
.loop .post:hover .img-holder .featured-image{
transform: scale(1.1, 1.1);
}
.loop h3{
font-size: 20px;
margin: 5px 0;
padding: 0;
font-weight: bold;
}
#load-posts{
display: flex;
width: 180px;
margin: 100px auto;
}
#load-posts.finish{
width: 260px;
opacity: .5;
}
.manual-tags{
display: flex;
flex-wrap: wrap;
}
.manual-tags a{
padding: 5px 10px;
background: #f0f0f0;
margin-right: 10px;
}
.loop-news .item:first-child .post{
border-top: 1px solid #9e9e9e;
padding-top: 30px;
}
.loop-news .post{
border-bottom: 1px solid #9e9e9e;
padding-bottom: 20px;
}
.loop-news .inner{
padding-right: 30px;
}
.loop-news .post-inner-content{
display: flex;
justify-content: space-between;
}
.loop-news .post-inner-content .post-meta{
min-width: 150px;
text-align: right;
}
#media screen and (max-width: 1199px) {
.sidebar .sidebar-get-a-quote .get-a-quote-info .btn {
font-size: 14px;
height: 50px;
}
#stats ul li p{
font-size: 16px;
}
#stats ul li p b{
font-size: 18px;
}
#industries ul li a{
font-size: 16px;
line-height: 1.2;
}
#why-obelis .blockquote p{
font-size: 18px;
line-height: 28px;
}
#stats ul li .img-inner{
width: 54px;
height: 54px;
}
.home-video iframe[src*="https://www.youtube.com/"] {
height: calc(210px / 1.77777778) !important;
width: 100% !important;
}
}
#media screen and (max-width: 991px) {
.navigation-trigger,
.mobile-nav,
.mobile-backdrop{
display: block;
}
.mobile-nav .logo img{
width: 200px;
height: 62px;
}
header .topbar{
display: none;
}
header .nav {
padding: 10px;
}
header .menu .nav {
display: none;
}
.navigation-trigger{
display: flex;
align-items: center;
}
.mobile-backdrop{
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 998;
background: rgba(0, 0, 0, 0.5);
visibility: hidden;
opacity: 0;
pointer-events: none;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.mobile-nav{
position: fixed;
width: 100%;
max-width: 300px;
height: 100%;
left: 0;
top: 0;
z-index: 999;
transform: translateX(-100%);
background: #fff;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.menu-active .mobile-backdrop{
visibility: visible;
opacity: 1;
pointer-events: all;
}
.menu-active .mobile-nav{
transform: translateX(0);
}
header .mobile-nav .topbar{
display: block;
margin-bottom: 44px;
}
header .mobile-nav .nav{
display: block;
padding: 0;
}
header .mobile-nav .logo{
padding: 15px;
}
header .nav ul{
flex-direction: column;
}
header .nav ul li a{
display: flex;
padding: 10px 15px;
border-bottom: 1px solid #f8f8f8;
color: #143074;
font-weight: 600;
justify-content: space-between;
align-items: center;
text-decoration: none;
}
header .nav ul li a:focus,
header .nav ul li a:hover{
text-decoration: none;
}
header .nav ul li .btn{
margin: 15px;
}
header .topbar .container{
padding: 0;
}
header .topbar .search-btn{
display: none;
}
header .topbar .header-top{
justify-content: flex-start;
}
header .topbar .header-top ul{
width: 100%;
display: flex;
justify-content: flex-start;
white-space: nowrap;
overflow: auto;
}
header .topbar ul li{
margin-right: 0;
}
header .topbar ul li a{
display: flex;
padding: 5px 10px;
line-height: 24px;
}
header .mobile-nav{
overflow: auto;
}
header .mobile-nav .search{
visibility: visible;
opacity: 1;
left: 0;
max-width: 100%;
width: 100%;
height: 44px;
pointer-events: all;
}
header .mobile-nav .search input{
font-size: 14px;
}
header .mobile-nav ul li a i{
display: none;
}
header .mobile-nav ul li a[data-submenu] i{
display: inline-block;
margin-left: 10px;
}
#services .inner .service-holder p{
font-size: 16px;
line-height: 24px;
}
.industries-and-services .col-industries ul li{
width: 100%;
}
#stats{
overflow: auto;
}
#stats ul{
min-width: 1000px;
padding-right: 30px;
}
#about-us-section .who-we-are:before{
width: 100vw;
right: 50%;
transform: translateX(50%);
}
#about-us-section .who-is-it-for .inner {
padding-left: 0;
}
.submenu{
display: none !important;
}
header .mobile-nav .submenu{
position: relative;
top: 0;
left: 0;
opacity: 1;
visibility: visible;
padding: 0;
}
header .mobile-nav .active .submenu{
display: block !important;
}
header .mobile-nav .submenu p,
header .mobile-nav .submenu p + a,
header .mobile-nav .submenu .link{
display: none;
}
#industries-submenu ul{
margin: 0;
}
#industries-submenu ul li {
width: 100%;
margin-top: 0px;
padding-right: 0px;
}
.submenu h3{
margin: 0;
}
header .nav ul li .submenu a{
padding: 15px 30px;
border-bottom: 1px solid #aeb3bd;
margin-left: -15px;
width: calc(100% + 30px);
line-height: 1;
color: #143074;
}
.submenu-style-1 {
padding: 10px 0 10px 20px;
}
header .search .btn{
top: 2px;
transform: none;
right: 17px;
}
.list-boxed .parent{
width: calc(50% - 30px);
}
.safer-markets ul li{
width: 100%;
flex: auto;
margin-bottom: 30px;
border: none;
}
.home-video{
margin-top: 0;
}
.home-video iframe[src*="https://www.youtube.com/"] {
height: calc(510px / 1.77777778) !important;
width: 100% !important;
}
.why-obelis ul{
padding: 40px 20px;
}
}
#media screen and (max-width: 767px) {
.intro{
padding: 60px 0 100px 0;
}
.intro h1{
font-size: 30px;
}
.intro p{
font-size: 16px;
}
#why-obelis{
padding: 50px 0;
}
#about-us-section .who-is-it-for{
padding: 50px 0;
}
#about-us-section .inner {
padding: 50px 0;
}
#about-us-section .who-is-it-for .inner{
padding: 0;
}
.list-posts ul li b{
display: block;
margin: 0;
}
footer .footer-bottom ul{
flex-wrap: wrap;
}
.banner .text-right{
display: flex;
margin-bottom: 20px;
}
#services .features li{
width: 100%;
}
#services .inner .row:before, #services .inner .row:after,
#services .inner:before{
display: none;
}
#services .inner .service-holder{
padding: 30px 0;
}
#services .features{
margin: 0;
}
#services .inner{
border: none;
}
.section-title{
margin-bottom: 50px;
}
.list-boxed .parent{
width: 100%;
margin: 0 15px 15px;
}
.industries-and-services {
margin: 0 0 50px 0;
}
.loop .post .post-inner-content{
flex-direction: column;
}
.loop-news .post-inner-content .post-meta{
text-align: left;
}
.loop-news .post{
padding-bottom: 30px;
}
}
#media screen and (max-width: 575px) {
#why-obelis .blockquote{
padding: 60px 30px;
}
header .nav .menu .logo img,
.mobile-nav .logo img {
width: 100px;
height: auto;
}
footer .footer-top{
padding: 20px 0;
}
.home-video iframe[src*="https://www.youtube.com/"] {
height: calc((100vw - 30px) / 1.77777778) !important;
width: 100% !important;
}
}
I found the problem - but I think, you are able to solve it by your own, as you know better the structure of your project.
Open your Link with Chrome (or Firefox)
Press F12 and select the mobile resolution:
Here you can open the mobile menu and see the bug, as shown in your picture
Now try to change the width of the resolution in Chrome:
You will see, that the bug will be automatically fixed
When looking at the HTML and CSS in Developer Tools, while doing these steps, you will see, that they change. Therefore you have to look at, what is changing and try to find a solution here.
My guess in your case is that some CSS values are wrongly set at the beginning (maybe while initializing the page dynamically??).
UPDATE:
It seems, that the top CSS attribute in your li tag (parent sub-industries classes) causes the problem (which seems to be dynamically calculated).
Hope I could help!

When suggested results display in our search box, we are unable to click through to the suggested product sku; how can we fix this?

/* =============================================================================
Global settings
========================================================================== */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
nav,
section {
display: block;
}
audio,
canvas,
video {
display: inline-block;
*display: inline;
*zoom: 1;
}
audio:not([controls]) {
display: none;
}
[hidden] {
display: none;
}
html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
html,
button,
input,
select,
textarea {
font-family: sans-serif;
color: #222;
}
body {
margin: 0;
font-size: 1em;
line-height: 1.4;
}
::-moz-selection {
background: #fe57a1;
color: #fff;
text-shadow: none;
}
::selection {
background: #fe57a1;
color: #fff;
text-shadow: none;
}
a {
color: #00e;
}
a:visited {
color: #551a8b;
}
a:hover {
color: #06e;
}
a:focus {
outline: thin dotted;
}
a:hover,
a:active {
outline: 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
blockquote {
margin: 1em 40px;
}
dfn {
font-style: italic;
}
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
ins {
background: #ff9;
color: #000;
text-decoration: none;
}
mark {
background: #ff0;
color: #000;
font-style: italic;
font-weight: bold;
}
pre,
code,
kbd,
samp {
font-family: monospace, serif;
_font-family: 'courier new', monospace;
font-size: 1em;
}
pre {
white-space: pre;
white-space: pre-wrap;
word-wrap: break-word;
}
q {
quotes: none;
}
q:before,
q:after {
content: "";
content: none;
}
small {
font-size: 85%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
ul,
ol {
margin: 0;
padding: 0;
}
dd {
margin: 0 0 0 40px;
}
nav ul,
nav ol {
list-style: none;
list-style-image: none;
margin: 0;
padding: 0;
}
img {
border: 0;
-ms-interpolation-mode: bicubic;
vertical-align: middle;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 0;
}
form {
margin: 0;
}
fieldset {
border: 0;
margin: 0;
padding: 0;
}
label {
cursor: pointer;
}
legend {
border: 0;
*margin-left: -7px;
padding: 0;
white-space: normal;
}
button,
input,
select,
textarea {
font-size: 100%;
margin: 0;
vertical-align: baseline;
*vertical-align: middle;
}
button,
input {
line-height: normal;
}
button,
input[type="button"],
input[type="reset"],
input[type="submit"] {
cursor: pointer;
-webkit-appearance: button;
*overflow: visible;
}
button[disabled],
input[disabled] {
cursor: default;
}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
padding: 0;
*width: 13px;
*height: 13px;
}
input[type="search"] {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
textarea {
overflow: auto;
vertical-align: top;
resize: vertical;
}
input:valid,
textarea:valid {} input:invalid,
textarea:invalid {
background-color: #f0dddd;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
td {
vertical-align: top;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
color: black;
padding: 0.2em 0;
}
.ir {
display: block;
border: 0;
text-indent: -999em;
overflow: hidden;
background-color: transparent;
background-repeat: no-repeat;
text-align: left;
direction: ltr;
*line-height: 0;
}
.ir br {
display: none;
}
.hidden {
display: none !important;
visibility: hidden;
}
.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
}
.invisible {
visibility: hidden;
}
.clearfix:before,
.clearfix:after {
content: "";
display: table;
}
.clearfix:after {
clear: both;
}
.clearfix {
*zoom: 1;
}
/* =============================================================================
Fonts
========================================================================== */
/* =============================================================================
Theme Global settings
========================================================================== */
#container {
min-height: 100%;
}
.content {
position: relative;
display: block;
width: 1024px;
margin: 0 auto;
}
.nav_hover {
background: #fff;
}
/* =============================================================================
Header
========================================================================== */
header {
position: relative;
width: 100%;
height: 100px;
background: url('../images/feral/header-bg.png') repeat-x;
}
header #logo {
float: left;
width: 33%;
padding: 18px 0 0 0;
margin-right: 25px;
}
/* =============================================================================
Nav
========================================================================== */
nav {
float: left;
width: 33%px;
height: 100px;
}
nav #site_tools {
float: left;
margin-left: 25px;
margin-right: 50px;
}
nav #site_tools a {
font-size: 14px;
color: #fff;
padding: 10px 10px 0 0;
text-decoration: none;
text-shadow: 0px 2px 1px #000;
}
nav #site_tools,
nav #display_search {
padding: 10px 0 0 10px;
}
nav #display_search input[type=text] {
width: 200px;
height: 10px;
font-size: 12px;
font-weight: bold;
padding: 10px;
margin: 0;
}
nav #display_search input[type=submit] {
width: 21px;
height: 21px;
background: url('../images/feral/search-icon.png') repeat-x;
border: none;
padding: 0;
margin: 0 0 0 5px;
}
#callus {
padding-top: 10px;
}
#top_nav {
height: 40px;
background: #8e744f;
}
#top_nav #display_menu_1 {
width: 1024px;
margin: 0 auto;
}
/* =============================================================================
Body
========================================================================== */
#main {
position: relative;
width: 100%;
background: #f4f4f4;
overflow: hidden;
}
#main #left_nav {
width: 214px;
background: #e5e4e4;
}
#main #left_nav h3 {
height: 26px;
font-size: 15px;
color: #fff;
background: #c2c0c0;
padding: 6px 0 0 15px;
}
#main #left_nav #display_menu_2 a {
color: #301f14;
}
#main #left_nav #display_menu_2 a:hover {
color: #fff;
background: #002284 left center no-repeat;
}
#main #content_area {
margin: 0;
padding: 6px 6px 15px 19px;
text-align: left;
width: 810px;
background: #fff;
}
#main #div_articleid_1 ul,
#main #div_articleid_5 ul {
margin-left: 0;
padding-left: 18px;
}
#main #div_articleid_1,
#main #div_articleid_4,
#main #div_articleid_5 {
line-height: 22px;
}
#main #div_articleid_4 strong {
margin-bottom: 10px;
}
table ul {
margin: 0 0 0 25px;
}
#slideshow {
position: relative;
height: 350px;
}
#slideshow A {
position: absolute;
top: 0;
left: 15px;
z-index: 8;
opacity: 0.0;
}
#slideshow A.active {
z-index: 10;
opacity: 1.0;
}
#slideshow A.last-active {
z-index: 9;
}
.special-products {
margin: 0 0 0 40px;
}
/* =============================================================================
Footer
========================================================================== */
footer {
position: relative;
width: 100%;
background: #575450;
border-top: 4px solid #900101;
}
footer .content {
height: 140px;
padding-top: 30px;
}
footer .content .left,
footer .content .center,
footer .content .text {
float: left;
width: 18%;
}
footer .content .left {
padding: 0 0 0 20px;
}
footer .content .center {
width: 80%;
font-size: 14px;
color: #fff;
}
footer .content .center a {
font-size: 14px;
color: #fff;
}
footer .content .center ul,
footer .content .text ul {
float: left;
}
footer .content .center ul {
margin-left: 25px;
}
footer .content .center ul li,
footer .content .text ul li {
list-style: none;
}
footer .content .center ul li.title {
font-weight: bold;
}
footer .content .text {
width: 100%;
clear: both;
text-align: center;
}
footer .content .text ul {
float: none;
margin: 40px 0 0 250px;
}
footer .content .text ul li {
float: left;
color: #fff;
font-size: 12px;
margin-right: 15px;
}
/* =============================================================================
Print
========================================================================== */
#media print {
* {
background: transparent !important;
color: black !important;
box-shadow: none !important;
text-shadow: none !important;
filter: none !important;
-ms-filter: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href)")";
}
abbr[title]:after {
content: " (" attr(title)")";
}
.ir a:after,
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group;
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
#page {
margin: 0.5cm;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
}
.productnamecolorLARGE > span:nth-child(1) {
font: 20px Arial;
}
This is our css template. I've been told there is something within the css that is interfering with a default function that would allow one to click on a drop-down suggestion from the search results and be redirected to the relevant page.
The links in the dropdown seem to work fine, you might be referring to the cursor.
Add
Located: jquery-ui.css line 101
.ui-menu .ui-menu-item a{
cursor: pointer !important;
}
or change
Located: jquery-ui.css line 69
.ui-autocomplete {
cursor:pointer
}

Height 100% not working

So I have a div that is supposed to have 100% height. It's only parent element is <body>, so 100% should be the height of the window. But instead of spanning the height of the screen, it only is as high as the container element inside it. The funny thing is, if I use fixed positioning, it does what I want it to. Alas, I can't use fixed in the site layout. Here is my css. If you would like to see what the site looks like right now, here is the link: http://ion.comli.com/projects/
body, ul {
margin: 0;
padding: 0;
}
body {
background: url('/images/background.png') no-repeat fixed;
}
/* CONTENT */
.content{
margin-left: auto;
margin-right: auto;
    position: absolute;
    top: 50px;
    left: 15%;
height: 100%;
width: 70%;
background-color: #ffffff;
}
/* END CONTAINER*/
/* CONTAINER */
.container{
background: #ffffff;
margin: 5% 10%;
text-align: center;
}
.container .title a {
font-family: Franchise, "sans-serif";
font-size: 48px;
color: black;
line-height: 48px;
text-align: center;
text-decoration: none;
}
.container .date {
font-family: Ubuntu, "sans-serif";
font-size: 12px;
color: #666666;
line-height: 12px;
text-align: center;
text-decoration: none;
}
.container .body {
font-family: Ubuntu, "sans-serif";
font-size: 16px;
text-align: left;
}
/* END CONTAINER */
/* PROJECT */
.project {
display: block;
margin: 5% auto;
height: 100px;
width: 500px;
border-radius: 10px;
background: url("/images/background.png");
opacity: 0.5;
}
.project h2 {
font-family: Franchise;
font-size: 48px;
color: white;
text-align: center;
}
/* END PROJECT */
/* NAVIGATION */
nav ul {
background-color: #1b1b1b;
display: table;
list-style: none;
position: fixed;
top: 0;
height: 50px;
width: 100%;
box-shadow: 0 0 6px #888888;
z-index: 1;
}
nav ul li {
float: left;
}
nav ul li a {
display: table-cell;
height: 50px;
line-height: 50px;
padding: 0 65px;
font-family: Ubuntu;
font-size: 16px;
color: #ffffff;
text-decoration: none;
background-color: #292929;
}
nav #title {
font-family: Lobster;
font-size: 36px;
line-height: 50px;
border-right: 1px solid #ffffff;
background-color: #1b1b1b;
}
nav #menu {
padding: 0 25px;
background-color: #1b1b1b;
}
nav #menu:hover {
box-shadow: none;
background-color: #292929;
}
nav li:hover #menu {
box-shadow: none;
background-color: #292929;
}
nav ul ul {
background: #292929;
display: none;
position: absolute;
top: 100%;
right: 0px;
width: 15%;
}
nav ul ul li {
background: #292929;
float: left;
position: relative;
clear: both;
}
nav ul li:hover > ul {
box-shadow: none;
display: block;
}
/* END NAVIGATION */
/* SCROLLBAR */
/* END SCROLLBAR */
Any way I can get this div to span the whole 100%? I'm pretty sure there is a simple answer to this question, but I can't find it. Thanks in advance!
You have to make sure all parents of .content have a height defined.
So in your case what is missing is:
html, body {
height: 100%;
}
Alternative
Or you could position .content as fixed and you'd have the same effect but with a different approach
.content {
position: fixed;
top: 0;
left: 0;
height: 100%;
}
Make body 100% high
html, body {
height: 100%;
}

Internet Explorer, when highlighting text it changes font and/or size

When highlighting text with IE 8 on a webpage that I'm currently developing the font changes and/or sometimes the size. The same thing happens sometimes when I hover over the menu.
This is how my css looks like and I don't know why the error occurs? One more thing that is very strange is that I have installed Windows 7 with paralells on my osx and the error does not occur there but only on PC computers. I have tried changing fonts but with no help...
This is my css:
body {
font-family: verdana, sans-serif;
font-size: 14px;
}
#wrapper, .wrapper {
width: 900px;
padding: 0 30px;
margin-left: auto;
margin-right: auto;
}
#header {
background: url('http://localhost:8888/wp-content/uploads/2012/09/120920_scam_banner.jpg') no-repeat;
height: 150px;
margin: 20px 0;
}
#header div {
width: 900px;
height: 150px;
margin-left: auto;
margin-right: auto;
position: relative;
background: none;
}
#header div a {
text-indent: -9999px;
position: absolute;
width: 900px;
height: 150px;
}
#header div a:hover {
background: none;
}
#section {
}
#menu {
float: left;
width: 175px;
padding: 20px 25px 0 0;
border-right: 2px solid #000;
text-align: right;
}
#menu a, a {
color: #000;
text-decoration: none;
}
.mp-formdiv {
float: right;
}
img {
border: 1px solid #000;
}
#menu a:hover, a:hover {
color: #fff;
background: #000;
}
.menu li {
margin: 3px 0;
text-align: right;
}
#menu h3 {
line-height: 52px;
}
#menu .artists {
padding-left: 10px;
}
#menu-artists li {
}
#content {
float: right;
width: 670px;
padding: 20px 0 50px 20px;
}
#footer {
overflow:hidden;
clear: both;
}
#white_footer {
float: left;
width: 300px;
background: #fff;
height: 20px;
}
#footer_content {
height: 20px;
}
.store {
overflow-y: scroll;
}
#the_store {
margin-top: 10px;
}
/* FONTS */
h1 {
font-size: 3em;
margin-bottom: 40px;
white-space: nowrap;
line-height: 0%;
}
h1.storefront {
font-size: 2em;
}
h2 {
font-size: 2em;
}
h3 {
font-size: 1.5em;
}
#content p strong {
font-weight: bold;
}
#content p img {
float: left;
margin: 5px 20px 20px 0;
}
#content p img:after {
margin-top: 20px;
}
#subscribe_mail input[type=text]{
width: 85px;
height: 12px;
font-size: 0.60em;
margin-bottom: 5px;
float: left;
margin-right: 4px;
}
#subscribe_mail input[type=text]:focus {
font-size: 0.75em;
}
#subscribe_mail input[type=submit] {
border: 1px solid #999;
font-size: 0.75em;
float: left;
}
.mp-message, .mp-loading {
font-size: 0.75em;
}
.MailPressFormName {
display: none;
}
#artist_info {
display: none;
margin-top: 40px;
overflow: hidden;
clear: both;
}
.more-less {
background: #000;
float: left;
color: #fff;
padding: 0 2px;
margin-top: 10px;
}
#artist_less {
display: none;
}
.gallery-icon a:hover {
background: none;
}
.gallery dl {
margin-top: 0 !important;
margin-bottom: 15px;
}
.gallery dl dd {
font-size: 0.75em;
}
.newsletterH {
margin-bottom: 5px;
}
I would use Firefox's Firebug plugin to see where the styles are coming from. IE provides a less friendly developer tool window that does something similar (I only use this if the style issue is only occurring in IE). I'd check your :hover and :focus rules first since those would cause things to happen on hover or select.

Resources