How do align this to center of section? - html

I have problem aligning three boxes to the center of section.
Here is what I have so far:
/*==============Custome Css ====================*/
.slider_patch {
background: rgba(63, 61, 61, 0.61);
padding: 0px 15px;
box-shadow: 1px 1px 28px #2F2F2F;
}
button.small.skyblue a {
color: #fff;
}
/*==============Custome Css ====================*/
/* #Misc
================================================== */
/* EXTRAS */
.brdr-r1, .brdr-r2 { border-right: 1px solid #e5e5e5; padding-right: 19px; }
.brdr-l1, .brdr-l2 { border-left: 1px solid #e5e5e5; padding-left: 19px; }
.brdr-r2 { padding-right: 27px; }
.brdr-l2 { padding-left: 27px; }
.pad-r27 { padding-right: 27px; }
.pad-l27 { padding-left: 27px; }
.alignright { text-align: right; }
img.alignright { float: right; }
.alignleft { text-align: left; }
img.alignleft { float: left; }
.aligncenter { text-align: center; }
.wp-caption { display: block; color: #444; }
.wp-caption-text { font-size: 15px; }
.sticky { color: #555; }
.gallery-caption { display: inline; }
.bypostauthor { font-size: 13px; }
.moonicons-box1 { font-size: 16px; display: inline-block; width: 15em; padding: .25em .5em; background: #fff; margin: .5em 1em .5em 0; border: 1px solid #e8e8e8; }
.alignright { text-align: right; }
img.alignright { float: right; }
.alignleft { text-align: left; }
img.alignleft { float: left; }
.aligncenter { text-align: center; }
.wp-caption { display: block; color: #444; }
.wp-caption-text { font-size: 15px; }
.sticky { color: #555; }
.gallery-caption { display: inline; }
.bypostauthor { font-size: 13px; }
/* Scroll to top */
#scroll-top a { width: 16px; height: 16px; padding: 6px 8px 9px; border-radius: 4px; background: #818c90; position: fixed; bottom: 48px; right: 32px; display: none; opacity: 0.89; filter: alpha(opacity=89); z-index: 499841; }
#scroll-top a i { font-size: 16px; color: #fff; display:block; }
#scroll-top a:hover { background-color: #ffcc00; cursor: pointer; }
h1.pnf404 { font-size: 176px; line-height: 1.1; font-weight:900;}
h2.pnf404 { font-size: 42px; line-height: 1.2; font-weight:700; }
input.txbx404 { float:left; margin-top:2px; margin-right:4px; padding:7px 4px; min-height:inherit; border-radius:3px; }
input.btn404 { float:left; margin:1px; padding:8px 12px 9px; }
.v-shadow-l { background:url(../images/v-shadow-left.png) no-repeat right center; }
.v-shadow-r { background:url(../images/v-shadow-right.png) no-repeat left center; }
.v-shadow-r, .v-shadow-l { min-height:320px; }
.pad-r10 { padding-right:10px; }
.pad-r20 { padding-right:20px; }
.pad-r30 { padding-right:30px; }
.pad-r40 { padding-right:40px; }
.pad-l10 { padding-left:10px; }
.pad-l20 { padding-left:20px; }
.pad-l30 { padding-left:30px; }
.pad-l40 { padding-left:40px; }
/* #Column Shortcodes
----------- */
.one_half, .one_third, .two_third, .three_fourth, .one_fourth, .one_fifth, .two_fifth { margin-right: 3%; float: left; margin-bottom:2px; }
.one_half { width: 48%; }
.one_third { width: 30.6666%; }
.two_third { width: 65.3332%; }
.one_fourth { width: 22%; }
.three_fourth { width: 74%; }
.one_fifth { width: 16.8%; }
.two_fifth { width: 37.6%; }
.column-last { margin-right: 0 !important; clear: right; }
.easyPieChart { position: relative; text-align: center; }
.easyPieChart canvas { position: absolute; top: 0; left: 0; }
.pie { text-align:center; font-size:49px; position:relative; margin:0 auto 20px; }
.pie p { font-size:16px; color:#888; font-weight:400; position:absolute; bottom:-52px; width:100%; padding-top:10px; border-top:2px solid #f9f9f9;}
.container .pie p { margin-bottom:0;}
/* #Media Queries
================================================== */
/* Smaller than standard 960 (devices and browsers) */
#media only screen and (max-width: 959px) {
.img-box { width: 256px; height: 188px; }
.last-project .img-box { background: #EA3C3C; }
.last-project .img-box:nth-child(even) { background: #F66060; }
.ab-box { height: 235px; }
.author-detail { width: 218px; }
.comment-contents { width: 343px; }
.child-comment .comment-contents { width: 263px; }
.contact input { width: 330px; float: none; }
.contact textarea { width: 486px; }
.row.magic, .s-qoute-man { padding: 0; margin-bottom: 10px; }
a.get { margin-bottom: 14px; }
.pad-r10, .pad-r20, .pad-r30, .pad-r40 { padding-right: 5px; }
.pad-l10, .pad-l20, .pad-l30, .pad-l40 { padding-left: 5px; }
#main-content-pin .container { width: auto; }
}
/* Tablet Portrait size to standard 960 (devices and browsers) */
#media only screen and (min-width: 768px) and (max-width: 959px) {
#boxed-wrap { width: 828px; }
.social-icons a { margin: 1px 4px 0 4px; }
.row.magic { padding-left: 20px; margin-bottom: 10px; }
#tline-content { width: 800px; }
.tline-box { width: 335px; }
/*#nav a span, #nav a:after { font-size:9px; }*/
.blog-date-sec { width: 42px; height: 42px; }
.help-box { width: 50%; }
}
/* All Mobile Sizes (devices and browser) */
#media only screen and (max-width: 767px) {
.sidebar, .rgt-cntt, .sidebar.leftside { padding-right:0; background:none; padding-top:40px; margin-top:40px; border-top:5px solid #e5e5e5;}
.rgt-cntt, .sidebar.leftside { padding-top:0px; margin-top:0px; border-top:0 none;}
.contact-form .txbx { width:224px;}
.pricing-table .plans-f-list.respo { display:inline; visibility:visible;}
#header.super-fixed { height:auto; box-shadow:none; border-bottom:4px solid #f0f0f0;}
#headline { height:auto; border-bottom:3px solid #f3f3f3; padding:14px 0; }
#headline h3 { border-top-color:#f6f6f6; font-size:37px; text-align:center;}
#headline h3 small { display:block; margin-top:14px; margin-bottom:0; font-size:16px; letter-spacing:0; font-weight:400; }
.servobx, .servobx div, .servobx img, ul#main-ibox li, ul#main-ibox li.active9 { width:100%; float:none;}
#search-form { display:none; }
#header .alignright, top-inf.alignright { text-align:center;}
#search-form2 { display:block; }
#side-content { padding-bottom:30px; border-bottom:5px solid #f3f3f3; margin-bottom:40px;}
.top-bar { height:65px; padding:5px 0 6px; background:url(../images/topsobg1.png) repeat-x center center; white-space:nowrap; overflow:hidden;}
.top-bar h6 { font-size:11px; letter-spacing:0; margin:0 10px 0 0;}
.top-bar h6 i { font-size:12px; width: 12px; height: 12px; text-align: center; padding:3px; margin-right:3px; }
.top-bar .socailfollow, .top-links, .top-links.rgtflot, .top-bar .socailfollow.lftflot { float:none; text-align:center; clear:both; min-height:22px;}
.top-bar .socailfollow, .top-bar .socailfollow.lftflot { padding-top:8px;}
.top-bar .socailfollow a, .top-bar .socailfollow.lftflot a, .top-links p, .top-links img { float:none; display:inline; padding-top:10px; background:none;}
.top-links, .top-links.rgtflot { margin:0 0 8px 0; padding-top:4px; }
.top-links.rgtflot { margin-top:12px; margin-bottom:6px;}
.container hr { margin-left:0; margin-right:0;}
.blog-date-sec { border:0 none; margin:0; text-align:left; border-bottom:1px solid #e5e5e5; background:#fdfdfd;}
.blog-post { border-bottom-width:3px;}
.nav-search { float: none; margin: 0; }
.img-box { width: 420px; height: 308px; }
.comment-contents { width: 328px; margin-right: 0; }
.child-comment .comment-contents { width: 248px; }
.contact textarea { width: 398px; }
.author-detail { margin: 20px 0; }
.blog-date-sec { width: auto; display:block; -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; border: none; border-bottom: 2px solid #e3e3e3; margin-bottom: 5px; }
.blog-date-sec span, .blog-date-sec h3 { display: inline; margin: 0 10px; line-height: 50px; }
.blog-date-sec span { font-size: 20px; font-weight: 300; }
.blog-date-sec h3 { font-size: 32px;}
.contact-form .txbx { width: 224px; }
.pricing-table .plans-f-list.respo { display: inline; visibility: visible; }
#headline h3 { border-top-color: #f6f6f6; }
.image-gallery ul li, .image-gallery ul li img { display:block; width:auto; max-width:100%; height:auto; float:none;}
input[type="text"].header-saerch, input[type="text"].header-saerch:focus { width: 261px; margin-top: 10px; }
.logo { text-align: center; }
.pin-box { width: 256px; }
.tline-box .blog-date-sp { width: 80%; }
.tline-box .blog-com-sp { width: 0; display: none; }
.tabs-left > .nav-tabs, .tabs-left > .nav-tabs > li > a, .nav-tabs > li, .nav-tabs > li.active, .tabs-left > .nav-tabs > li.active > a, .tabs-left > .nav-tabs .active > a:hover { width:100%; display:block; padding-left:0; padding-right:0; }
.tabs-left > .nav-tabs > li > a { border-right:0 none;}
.tabs-left > .tab-content { border:0 none;}
.tab-content .columns, .tab-content .column { margin:0 10px; max-width:90%; }
.date-sp-wrap { margin: 0; float: right; margin-bottom: 7px; }
.blog-line .blog-date-sec { height: auto; }
.v-shadow-r, .v-shadow-l { min-height: inherit; background: none; }
.pad-r10, .pad-r20, .pad-r30, .pad-r40, .pad-l10, .pad-l20, .pad-l30, .pad-l40 { padding: 0; }
.one_half, .one_third, .two_third, .three_fourth, .one_fourth, .one_fifth, .two_fifth { width: 100%; float: none; margin-right: 0; }
.latest-f-blog, .qot-week { margin:0;}
.callout { margin:10px 0px 20px; }
.brdr-l1, brdr-r1 { padding:0; border:0 none; }
.brdr-l1 { margin-top:30px;}
.tab-content p, .tab-content li { font-size: 12px; }
.help-box { width: 100%; }
.ab-box { height: auto; padding-bottom: 25px; }
input[type="text"].header-saerch, input[type="text"].header-saerch:focus { float: none; display: inline; position: relative; z-index: 10000; }
.jcarousel-next, .jcarousel-prev { padding:12px; }
.jcarousel-prev { right:38px;}
.jcarousel-next:after, .jcarousel-prev:after { top:13px; right:13px;}
.our-clients-wrap .jcarousel-next, .our-clients-wrap .jcarousel-prev { padding:10px;}
.is-sticky, .is-sticky #header { position:relative; height:auto;}
.is-sticky #header { margin-top:0;}
.is-sticky .logo { height:auto; margin-top:0; }
.is-sticky .logo img { max-height:auto; height:auto; }
}
/* Mobile Landscape Size to Tablet Portrait (devices and browsers) */
#media only screen and (min-width: 480px) and (max-width: 767px) {
.help-block { height: auto; }
#boxed-wrap { width: 460px; }
.page-subtitle { left: 0; padding: 10px 0 0 20px; bottom: 0; border-bottom: 1px solid #e8edee; margin-bottom: 20px; height: auto; width: auto; clear: both; background: #fdfdfd; border-radius: 0; }
.contact-form .txbx { width: 338px; }
.pricing-table .plans-f-list.respo { display: inline; visibility: visible; }
.jcarousel-item, .last-project .portfolio-item { max-width: 210px; height: 157px; float: left; }
.pin-box { width: 166px; width: 164px\9; }
#tline-content { width: 460px; }
.tline-box { width: 165px; }
}
/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */
#media only screen and (max-width: 479px) {
.nav-wrap2.mn4 #nav a { padding: 15px 4px; }
#menu a { padding: 15px 4px; }
.img-box { width: 300px; height: 220px; }
.author-detail { width: 254px; }
.author-arrow { width: 11px; height: 6px; background: url('../images/testimonial-arrow-top.png') no-repeat; left: 25px; top: -6px; }
.contact input { width: 288px; margin-right: 0; }
.contact textarea { width: 278px; }
#boxed-wrap { width: 340px; }
.footbot { min-height: 38px; height: auto; }
.page-subtitle { left: 0; padding: 10px 0 0 20px; bottom: 0; border-bottom: 1px solid #e8edee; margin-bottom: 20px; height: auto; width: auto; clear: both; background: #fdfdfd; border-radius: 0; }
.pricing-table .plans-f-list.respo { display: inline; visibility: visible; }
.pricing-table ul { width: 136px; }
.pricing-table ul li { width: 124px; padding: 5px; }
.pricing-table ul li.plan-header, .pricing-table ul li .plan-title, .pricing-table ul li .plan-price { max-width: 136px; }
.pricing-table ul li.plan-footer { max-width: 114px; }
.portfolio-item { margin-bottom: 14px; }
.commentin { width: 92%; }
#tline-content { width: 300px; }
.tline-box { width: 250px; }
.tline-row-l, .tline-row-r { display: none }
.tline-box.rgtline { float: left; left: 0; }
}
#media only screen and (min-width: 1200px) {
#boxed-wrap { width:1180px;}
.white-space { height:110px;}
h4.subtitle { margin:39px 0 21px 0; }
#main-content-pin .container { padding:0 40px; }
.sidebar.leftside { background-position: 295px; padding-right:70px; }
.blog-date-sec h3 { font-size:36px;}
}
#media screen and (min-width: 767px) {
/* ensure #nav is visible on desktop version */
#nav { display: block !important; }
.ls-layer h1, .ls-layer h3 { left:10px;}
}
button.small.skyblue.demooo {
width: 65%;
/*border-bottom: 6px solid rgb(0, 150, 192);*/
}
li.color {
background-color: rgb(197, 197, 197);
padding: 4px;
}
section.container.first-block.aligncenter.colorbar {
/*background: rgb(0, 173, 239);*/
/* width: 100%; */
/* left: 10px; */
padding: 0px 38px 0px 38px;
}
h4.slight.frontsight {
color: #333;
}
figure.shop-item.one_fourth.boxwrap {
background: white;
margin-bottom:35px;
border-radius: 4px;
box-shadow: 0px 1px 6px rgba(0, 0, 0, 0.42);
/*margin-right:10px;
width: 17%;*/
/* padding: 6px; */
/* left: 99px; */
/* color: black; */
/* padding: 0px; */
/* top: 18px; */
}
h4.fronttext {
font-size: 15px;
line-height: 24px;
/* color: black !important; */
}
figure.shop-item.one_fourth.boxwrap:hover {
background: rgba(239, 239, 239, 1);
/* color: white; */
}
/* --------Custom CSS-------------*/
table {
width:100%;
}
table tr{
height:20px;
}
table tr td p{
margin-bottom:0px;
}
tr:nth-child(even) {
background-color: rgb(166, 206, 244);
}
tr:nth-child(odd) {
background-color: rgb(207, 230, 252);
}
tr:nth-child(even):hover {
background-color: rgb(242, 244, 245);
}
tr:nth-child(odd):hover {
background-color: rgb(242, 244, 245);
}
td:nth-child(even) {
vertical-align:middle;
text-align:left;
padding:10px;
}
td:nth-child(odd) {
vertical-align:middle;
text-align:left;
padding:10px;
}
.parallax-sec .blox{
padding:20px 0 0px;
}
.eleven.columns .shop-wrap figure{
margin-right: 3%;
}
table.product-details caption{
float:left;
}
.product-details{
width:100%;
}
.contact-inf p{
margin-bottom:10px;
}
.response{
height:600px;
width:80%;
margin:0 auto;
display:block;
padding:60px 50px;
text-align:center;
font-size:14;
}
.ls-layer h2{
font-size:40px !important;
}
/*---------Custom CSS--------------*/
<section class="container first-block aligncenter colorbar">
<hr class="vertical-space3">
<h2 class="mex-title">Welcome to the Polymers Enterprises</h2>
<h4 class="slight frontsight">Scaling new heights on the strength of Excellence, Efficiency & Ethics</h4>
<hr class="vertical-space3">
<div class="services">
<div class="one_fourth">
<article class="icon-box1"><i class="fa-user"></i>
<h5>ABOUT US</h5>
<p>For over 30 years, Polymers Enterprises has developed a record of service, growth and reliability unsurpassed....</p>
<button type="button" class="small skyblue demooo" onclick="window.location.href='about.html'">Read more</button>
</article>
</div>
<!--<div class="one_fourth">
<article class="icon-box1"><i class="li_bulb"></i>
<h5>EFFICIENCY</h5>
<p>We have made good relationship with customers by supplying them excellent quality products, which help us to ...</p>
<button type="button" class="small skyblue demooo" onclick="window.location.href='about.html'">Read more</button>
</article>
</div>-->
<div class="one_fourth">
<article class="icon-box1"><i class="li_note"></i>
<h5>WHAT WE DO</h5>
<p>Our policy is to achieve Quality in supply chain and maximize the serviceability to the client coupled with quality of cost....</p>
<button type="button" class="small skyblue demooo" onclick="window.location.href='about.html'">Read more</button>
</article>
</div>
<div class="one_fourth column-last">
<article class="icon-box1"><i class="fa-cubes"></i>
<h5>OUR PRODUCTS</h5>
<p>Polymer Enterprises provides a wide range of products and consulting services to customers .....</p>
<button type="button" class="small skyblue demooo" onclick="window.location.href='our_products.html'">Read more</button>
</article>
</div>
</div>
</section>
I have tried giving width display:block, display:inline-block and margin: 0 auto but no luck.Also I have been to almost all questions here but noone helped me. Can anyone help me get it sorted?
Here is Fiddle
Thanks !

Making them display: inline-block does work, you just need to remove the float.
.one_half, .one_third, .two_third, .three_fourth, .one_fourth, .one_fifth, .two_fifth {
margin-right: 3%;
display: inline-block; /* remove float and add display inline-block */
margin-bottom:2px;
}
Demo
Note: Add vertical-align:top; if you want the content in each to line up, demo here.

Related

In mobile devices the site does not respond propertly but on desktop it works perfectly fine

I have this html code of my home page. The website is wwww.chatziefraimidis.com. It works perfectly fine in a desktop browser but in mobile the footer and the header are smaller than the screen and that even more weirdly happens only on the home page and on the other pages with exactly the same code it works both on desktop and mobile browser correctly. Does anyone know how to fix this?
and the coresponding css code is
body{
font: 15px/1.5 "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
padding: 0;
margin:0;
font-weight:normal;
background: #f6f6f6;
}
/*Global*/
.container{
width:90%;
margin:auto;
overflow:hidden;
}
header ul{
margin:0;
padding:0;
}
.button_1{
height:32px;
background:#7B68EE;
border: 0;
padding-left:20px;
padding-right:20px;
color:#ffffff;
}
.dark{
padding:15px;
background:#35424a;
color:#ffffff;
margin-top:10px;
margin-bottom: 10px;
}
/*Header**/
header{
background: #35424a;
color:#ffffff;
padding-top:20px;
min-height: 70px;
border-bottom: #7B68EE 5px solid;
}
header a{
color:#f4f4f4;
text-decoration: none;
text-transform: uppercase;
font-size: 16px;
}
header li{
float:left;
display:inline;
padding: 0 16px 0 16px;
}
header #branding{
float:left;
}
header #branding h1{
margin:0;
}
header nav{
float:right;
margin-top: 15px;
}
header .highlight, header .current a{
color:#7B68EE;
font-weight:normal;
}
header .current2 a{
color:#000000;
font-weight:normal;
}
header a:hover{
color:#cccccc;
font-weight: bold;
}
/* showcase*/
#showcase{
min-height:600px;
min-width:500px;
background:url('../img/showcase.png') no-repeat 0 -100px ;
background-position: center;
background-size:100%;
text-align:center;
color: #ffffff;
}
#showcase h1{
margin-top:100px;
font-size:50px;
margin-bottom:10px;
background: #35424a ;
opacity: 0.6;
}
#showcase p{
font-size:20px;
background: #35424a ;
opacity: 0.6;
}
/*newsletter*/
#newsletter{
padding:15px;
color:#ffffff;
background:#35424a;
}
#newsletter h1{
float:left;
font-size:17px;
}
#newsletter form{
float:right;
margin-top:15px;
}
#newsletter input[type="email"]{
padding:4px;
height:25px;
width: 250px;
}
/*boxes*/
#boxes{
margin-top: 20px;
}
#boxes .box{
float:left;
text-align: center;
width:33%;
padding:10px;
}
#boxes .box img{
width:30%;
}
/*side bar*/
aside#sidebar{
float:right;
width: 30%;
margin: 10px
}
/*main cal*/
article#main-col{
float:left;
width: 65%;
}
/*projects*/
ul#services li{
list-style: none;
padding: 20px;
boarder:#cccccc solid 1px;
margin-bottom:5px;
background:#e6e6e6;
}
div.gallery {
border: 1px solid #ccc;
float: left;
}
div.gallery:hover {
border: 1px solid #777;
}
div.gallery img {
width: 100%;
height: auto;
}
div.desc {
padding: 15px;
text-align: center;
}
* {
box-sizing: border-box;
}
.responsive {
padding: 0 6px;
float: left;
width: 33%;
}
.row {
margin: 8px -16px;
}
/* Add padding BETWEEN each column */
.row,
.row > .column {
padding: 8px;
}
/* Create four equal columns that floats next to each other */
.column {
float: left;
width: 33%;
}
/* Clear floats after rows */
.row:after {
content: "";
display: table;
clear: both;
}
#media only screen and (max-width: 700px) {
.responsive {
width: 49.99999%;
margin: 6px 0;
}
.column {
width: 49.9%;
margin: 6px 0;
}
}
#media only screen and (max-width: 500px) {
.responsive {
width: 100%;
}
.column {
width: 100%;
}
}
.clearfix:after {
content: "";
display: table;
clear: both;
}
/*people*/
ul#people li{
list-style: none;
padding: 20px;
boarder:#cccccc solid 1px;
margin-bottom:5px;
float: left;
background:#e6e6e6;
}
ul#people img{
float: left;
}
/*form*/
aside#sidebar .quote input, aside#sidebar .quote textarea {
width:90%;
padding: 5px;
}
/*footer*/
footer{
padding:20px;
margin-top:20px;
color:#ffffff;
background-color:#483D8B;
/* text-align: center;*/
}
.column1 {
float: left;
width: 50%;
margin-left:50px;
}
.column2 {
float; top;
float: right;
width: 50%;
margin-right:50px;
}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
.fa {
padding: 20px;
font-size: 30px;
text-align: center;
text-decoration: none;
margin: 2px 2px 2px 2px;
}
.fa:hover {
opacity: 0.7;
}
.fa-facebook {
background: #3B5998;
color: white;
}
.fa-linkedin {
background: #007bb5;
color: white;
}
.fa-youtube {
background: #bb0000;
color: white;
}
.fa-instagram {
background: #125688;
color: white;
}
.fa-android {
background: #a4c639;
color: white;
}
/*media quaeris*/
#media(max-width:768px){
header #branding, header nav , header li , #newsletter h1, #newsletter form, #boxes .box,
article#main-col, aside#sidebar
{
float:none;
text-align:center;
width:100%;
}
header {
padding-bottom: 15px;
}
#showcase{
background-size:768px;
}
#showcase h1{
margin-top:40px;
}
#newsletter button, .quote button{
display: block;
width: 100%;
}
#newsletter form input[type="email"], .quote input, .quote textarea{
margin-bottom: 5px;
width: 100%;
}
}
<header>
<div class="container">
<div id="branding">
<h1><span class="highlight">Fasma</span> Engineers</h1>
</div>
<nav>
<ul>
<li class="current">Home</li>
<li>About</li>
<li>Projects</li>
<li>People</li>
<li class="current2">|EN</li>
<li>GR|</li>
</ul>
</nav>
</div>
</header>
<section id="showcase">
<div class="container">
<h1>World Class Structural And Geotechnical Engineers</h1>
<p>Expienced With The Most Prestigious Projects</p>
</div>
</section>
<section id= "newsletter">
<div class="container">
<h1>Subsctibe to our NewsLetter</h1>
<form name="submit-to-google-sheet">
<input type="email" name="email" placeholder="Enter Email">
<button type="submit" class= "button_1">Subscribe</button>
</form>
</div>
</section>
You have to remove min-width: 500px; from style.css line 90.
and add
#media(min-width:500px){
#showcase{
min-width:500px;
}
}
So It will look like -
Convert your widths to use percentages if you want a really responsive layout.
header {
padding-bottom: 2%;
}
#showcase{
background-size:88%;
}
#showcase h1{
margin-top:5%;
}

I want a text box appear when my client is using only IE 11 to open my website [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I want a text box to appear when a user or client is opening my website using IE 11, while I'm trying to resolve a problem in my code.
Or if you maybe have an idea to resolve my problem please write to my inbox here on stackoverflow. (IE 11 is killing me...)
as you can see the problem is when you are opening It on IE it makes the images full size, and the console in ie is not helping that much for me.
Code
Html
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<title>News | Designplace</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat" rel="stylesheet">
<link href="CSS/Navigation.css" rel="stylesheet" type="text/css">
<link href="CSS/Content.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="NavScript.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<body>
<div class="sidenav" id="mySidenav">
<!--NAv-->
</div>
<div class="sidenav_small" id="mySidenav_small">
</div>
<div class="sidenav_icon" id="mySidenav_icon">
☰
</div>
<div class="latest">
<h2 class="latest_news">Latest News</h2>
<h4 class="more">More...</h4>
<div class="table">
<div class="tr">
<div class="td">
<a class="img_link" href="/art/news/00004/Review-af-macos-Mojave-public-beta.html">
<img src="https://www.catster.com/wp-content/uploads/2017/08/A-fluffy-cat-looking-funny-surprised-or-concerned.jpg" alt="macOS">
<div class="inner">
<h3>Review af macOS Mojave beta: God men ikke perfekt.
</h3>
</div>
</a>
</div>
<div class="th"></div>
<div class="td">
<a class="img_link" href="/art/news/00002/206-400-danskere-har-downloadet-ny-nemid-app-i-foerste-doegn-efter-lancering.html">
<img src="https://www.catster.com/wp-content/uploads/2017/08/A-fluffy-cat-looking-funny-surprised-or-concerned.jpg" alt="NemID">
<div class="inner">
<h3>206.400 danskere har downloadet ny NemID-app i første døgn efter lancering.
</h3>
</div>
</a>
</div>
<div class="th"></div>
<div class="td">
<a class="img_link" href="/art/news/00001/hands-on-nokias-spritnye-foraarskollektion-viser-at-billige-smartphones-ikke-behoever-at-vaere-tarvelige.html">
<img src="https://www.catster.com/wp-content/uploads/2017/08/A-fluffy-cat-looking-funny-surprised-or-concerned.jpg" alt="Nokia telefon">
<div class="inner">
<h3>Hands-on: Nokias spritnye forårskollektion viser, at billige smartphones ikke behøver at være tarvelige.
</h3>
</div>
</a>
</div>
</div>
</div>
</body>
</head>
</html>
CSS
#charset "UTF-8";
html, body {
height: 100%;
}
.object {
height: 100%;
width: 100%;
}
.table {
display: table;
width: 100%;
}
.tr {
display: table-row;
}
.td {
display: table-cell;
/*border: 1px solid #ccc;*/
padding: 2px;
width: 31.1%
}
#media screen and (max-width: 400px) {
body {
background-color: #596770;
margin-left: 0px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 40px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
font-size: 14px;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
/* Bottom left text */
.inner {
position: absolute;
text-decoration: none;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
min-height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:20%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width: 401px) and (max-width:600px) {
body {
background-color: #596770;
margin-left: 0px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
th {
width: 423px;
height: 273px;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 50px;
text-align: center;
margin: -10px;
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
font-size: 18px;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
min-height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:20%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width: 601px) and (max-width: 720px) {
body {
background-color: #596770;
margin-left: 0px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
th {
width: 423px;
height: 273px;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 70px;
text-align: center;
margin: -10px;
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
font-size: 24px;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
min-height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:20%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width:720px) and
(max-width:750px) {
body {
background-color: #596770;
margin-left: 0px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 80px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:29%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width: 750px) and (max-width: 1280px) {
body {
background-color: #596770;
margin-left: 85px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.th {
width: 20px;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 80px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:20%;
margin-right: 20px;
}
.teaser {
font-size:70%;
min-height: 50%;
padding: 5px 0px 0px 0px
}
.infoline {
font-size: 70%;
color:white;
}
.article_img {
width: 100%
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width: 1281px) and (max-width: 1440px) {
body {
background-color: #596770;
margin-left: 85px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 80px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:29%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width: 1441px) and (max-width:1920px) {
body {
background-color: #596770;
margin-left: 85px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 80px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.latest_news {
width: 300px;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
margin-top: 5px;
font-size: 13px;
min-height: 25%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:22%;
margin-right: 20px;
}
.infoline {
font-size: 12px;
}
.article_img {
width: 100%;
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width:1921px) and (max-width:2160px) {
body {
background-color: #596770;
margin-left: 85px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 80px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.latest_news {
width: 300px;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
min-height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:19.5%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%;
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
#media screen and (min-width:2160px) and (max-width:3840px) {
body {
background-color: #596770;
margin-left: 85px; /* Same as the width of the sidenav */
margin-top: 102.5px;
font-size: 18px; /* Increased text to enable scrolling */
padding: 0px 52px 0px 52px;
/*font-size: 35;*/
color:white;
font-family: montserrat, sans-serif;
}
.latest img {
max-width: 100%;
}
.About {
margin: -45px -52px 0px -52px;
}
.warning {
font-size: 80px;
text-align: center;
margin: -10px
}
.about-line {
margin: 30px;
}
.experimental {
text-align: center;
}
.td {
position: relative;
color: white;
}
/* Bottom left text */
.inner {
position: absolute;
font-size: 14px;
bottom: 15px;
left: 30px;
-webkit-user-select: none; /* Safari */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE10+/Edge */
user-select: none; /* Standard */
}
.img_link {
color: white;
text-decoration: none;
}
.latest_news {
width: 300px;
}
.more {
float: right;
margin-top: -45px;
color:white;
}
.more:hover {
text-decoration: underline;
}
td {
padding: 5px 8px 5px;
}
table {
width:100%;
}
thead {
display: none;
}
tr:nth-of-type(2n) {
background-color: inherit;
}
tr td:first-child {
/*background: #f0f0f0;*/
font-weight:normal;
font-size:1.3em;
}
tbody td {
display: block;
text-align:left;
}
tbody td:before {
content: attr(data-th);
display: block;
text-align:left;
font-weight: normal;
}
tbody td::before {
content: attr(data-th);
display: none;
}
.img {
width: 100%;
}
.content {
width: 400px;
overflow: hidden;
}
.teaser {
font-size: 13px;
min-height: 50%;
}
.columnrow {
padding: 10px 0px 10px 0px;
display:flex;
}
.contentimage {
Float:left;
width:11%;
margin-right: 20px;
}
.infoline {
font-size: 13px;
}
.article_img {
width: 100%;
}
.article {
margin: 0% 15%;
}
.article_infoline {
font-size: 12px;
}
.article_teaser {
font-size: 18px;
margin-bottom: 10px;
}
.article_title {
margin-bottom: 3px;
}
.article_line {
margin: 30px 0px;
}
.article_image_text {
font-size: 14px;
margin-top: 0px;
}
}
EDIT:
I changed the code from .Img to .Img_link > Img and that worked but if someone has an idea to get var isIE11 = !!window.MSInputMethodContext && !!document.documentMode; working with an whole javascript, I will be happy, im not that good with javascript yet.
i've tried:
function IncompatibleBrowser() {
var x = document.getElementById("simpleModal")
var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;
if (true) {
x.className += " Incompatible";
} else {
x.className = "Compatible"
}
}
EDIT 2:
Okay the code that Zani gave worked kinda. the console in our browsers only detects the code in IE11, just a I wanted. but the code gave an error:
Script 5007: Unable to get property 'style' of undefined or null reference
This is the code that Zani gave.
<script type="text/javascript">
var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;
if(isIE11)
document.getElementById("IDOfYourElement").style.display="block";
</script>
There is no problem with IE. The problem is in your code.
Please find all .img {width:100%} in your enormous CSS and replace them with
img {width:100%} (without a dot).
You can target IE11 with browser sniffing. This comes with its own downsides, as you might know.
In my experience IE11 is not that bad (compared to IE8 or Safari). So there is a good chance that your issue or set of issues can be handled.
Please ask a more specific question.
<script type="text/javascript">
var isIE11 = !!window.MSInputMethodContext && !!document.documentMode;
if(isIE11)
document.getElementById("IDOfYourElement").style.display="block";
</script>
Please first search before ask question.
Internet Explorer 11 detection

html/css: Images slightly shifting on hover?

I have set up a page with Wordpress in which thumbnails are displayed for all posts along with the respective post's title as a link to the post itself. The thumbnail images are links to the post as well.
The current version of the site can be seen here: http://udkdev.skopec.de/category/projekte/
Can someone explain to me, why all of the thumbnail images slightly shift when being hovered over? I thought I might have messed up something with the margins, the padding or the border, but after going through the site's CSS multiple times, I can't make out the mistake. Here's the code of the site itself along with the theme's CSS:
<?php get_header(); ?>
</div>
<br>
<div class="wrapper-offset-fix wrapper-projekte">
<div class="projekte">
<div class="button-group filters-button-group">
<button class="active btn" id="all">alle</button>
<button class="projekt-btn btn" id="category-wise-201516">WiSe 15/16</button>
<button class="projekt-btn btn" id="category-sose-15">SoSe 15</button>
<button class="projekt-btn btn" id="category-wise-201415">WiSe 14/15</button>
<button class="projekt-btn btn" id="category-sose-14">SoSe 14</button>
<button class="projekt-btn btn" id="category-wise-201314">WiSe 13/14</button>
<button class="projekt-btn btn" id="category-sose-2013">SoSe 13</button>
<button class="projekt-btn btn" id="category-wise-201213">WiSe 12/13</button>
<button class="projekt-btn btn" id="category-sose-2012">SoSe 12</button>
</div>
<?php if (is_home()) {
query_posts("cat=-3");
} ?>
<?php if (have_posts()): ?>
<?php while(have_posts()): the_post(); ?>
<div <?php post_class(); ?>>
<p><?php the_title(); ?></p>
<a href="<?php the_permalink(); ?>">
<?php
if ( has_post_thumbnail() ) {
the_post_thumbnail('large');
} ?>
</a>
<!--<div class="meta">Tags: <?php the_tags( '', ', ', '<br />' ); ?> </div>-->
</div>
<?php endwhile; ?>
<?php else : ?>
<h2>Couldn’t find any articles!</h2>
<?php endif; ?>
</div>
<script>
var $btns = $('.btn').click(function() {
if (this.id == 'all') {
$('.projekte > .post').fadeIn(300);
} else {
var $el = $('.' + this.id).fadeIn(300);
$('.projekte > .post').not($el).fadeOut(300);
}
$btns.removeClass('active');
$(this).addClass('active');
})
</script>
<?php get_footer(); ?>
The CSS of the site's WP-Theme:
/* -------------------------------- Default WP classes */
* {
/*cursor: url('kvscursor-01-4.png'), auto; */
/*cursor: -webkit-image-set(url("kvscursor-01-4.png") 1x, url("kvscursor-01-4x2.png") 2x) 0 0, auto;*/
}
html {
font-size: 62.5%; }
body {
font-size: 1.7em;
line-height: 1.5;
letter-spacing: 0.6px;
/* background: #6f6;*/
color: #fff;
background: #111;
/* -webkit-hyphens: auto;
-moz-hyphens: auto;
-ms-hyphens: auto; */
}
a {
color: white;
}
.wrapper {
max-width: 100%;
margin: 1em 1em 0 1em;
position: relative; }
.wrapper h1 {
font-family: 'News Gothic W01 Bold';
}
.wrapper a:link, a:visited {
/*color: #fff;*/
text-decoration: none;
}
.post-navigation {
/*display: flex;*/
margin-top: 10em;
max-width: 750px;
}
.post-navigation a, .top a, .back a {
color: rgba(255, 255, 255, 1);
border-bottom: 0px solid #ffffff;
padding-bottom: 0px;
}
.post-navigation a:hover, .top a:hover, .back a:hover {
color: rgb(255, 255, 255);
border-bottom: 1px solid #ffffff;
}
.menu a {
color: white
}
.menu a:hover {
border-bottom: 1px solid white;
/*padding-bottom: 0px;*/
}
.projekte a:link, a:visited {
text-decoration: none; }
.projekte a: {
/*border-bottom: 0px solid white;*/
}
.btn {
margin-top: 7px;
padding-bottom: 1px;
color: white;
}
.btn:hover {
border-bottom: 1px solid white;
padding-bottom: 1px;
cursor: pointer;
}
.projekt-btn {
margin-top: 7px;
padding-bottom: 1px;
color: white;
}
.projekt-btn:hover {
color: white;
border-bottom: 1px solid white;
padding-bottom: 1px;
cursor: pointer;
}
.footer-left {
float: left;
margin-left: 0%;
}
.footer-center {
float: right;
margin-left: 0;
}
.footer-right {
float: right;
margin-right: 0;
}
/* NAVIGATION */
nav.menu .current-menu-parent a:link, nav.menu .current-menu-parent a:visited, nav.menu .current-menu-item a:link, nav.menu .current-menu-item a:visited {
position: relative; }
nav.menu .current-menu-parent a:link:after, nav.menu .current-menu-parent a:visited:after, nav.menu .current-menu-item a:link:after, nav.menu .current-menu-item a:visited:after {
position: absolute;
height: 1px;
background: #fff;
width: 100%;
right: 0;
display: block;
content: "";
margin-top: -2px;
}
nav.menu li.menu-item {
margin-right: 0.5em; }
/* nav.menu li.menu-item:hover {
position: relative; }
nav.menu li.menu-item:hover:after {
position: absolute;
height: 0.5px;
background: #fff;
width: 100%;
right: 0;
display: block;
content: "";
margin-top: -2px; } */
nav.menu .menu-main_menu-container .menu li.menu-item {
display: inline; }
nav.menu .menu-main_menu-container .menu li.home {
display: block; }
nav.menu .menu-main_menu-container .menu li.home a:link {
font-family: 'News Gothic W01 Bold'; }
nav.menu .menu-main_menu-container .menu .sub-menu {
display: none; }
nav.menu .sub-item li {
display: inline; }
/* PAGE + BLOG*/
/*.content a {
color: #fff;}*/
.content {
margin-top: 1.5em; }
.content h2 {
font-family: 'News Gothic W01 Bold';
margin-bottom: 1.5em; }
.content h2 a:link {
font-family: 'News Gothic W01 Bold'; }
.content p {
margin-bottom: 1.5em;
max-width: 700px; }
.content ul.page-list {
list-style: disc;
margin-left: 1em; }
.content .post {
width: 100%; }
.content .post img.wp-post-image {
margin-bottom: 1.5em; }
.content .post p img.alignnone {
max-width: 55vw;
height: auto;
margin-bottom: 0.5em; }
.content .post .wp-caption {
font-family: 'LetterGothicW01-Regular';
margin: 1.5em 0; }
.content .page {
position: relative; }
.content .page .alignnone {
position: relative;
width: 100% !important; }
.content .page .alignnone img {
width: 100%;
max-width: 1000px;
height: auto; }
/* STUDIERENDE */
.wrapper-studierende {
margin: 0 0em; }
.wrapper-studierende .button-group {
margin: 0 0 1.5em 0; }
.wrapper-studierende .button-group button {
background: none;
margin-right: 1.5em;
border-bottom: 1px solid black;
}
.wrapper-studierende .button-group button:hover {
position: relative;
border-bottom: 1px solid white;
}
.wrapper-studierende .button-group button:hover:after {
position: absolute;
height: 1px;
background: black;
width: 100%;
right: 0;
display: block;
content: "";
margin-top: -5px; }
.wrapper-studierende .button-group button:focus {
outline: 0;
text-decoration: none;
}
.wrapper-studierende .button-group button.active {
position: relative;
border-bottom: 1px solid white;
text-decoration: none;
}
.wrapper-studierende .button-group button.active:after {
position: absolute;
height: 1px;
background: black;
width: 100%;
right: 0;
display: block;
content: "";
margin-top: -5px;
text-decoration: none;
}
.wrapper-studierende .post {
width: 23.25%;
float: left;
margin-right: 2.3%;
margin-bottom: 2.3%; }
.wrapper-studierende .post h2 a:link {
font-family: 'News Gothic W01 Bold'; }
.wrapper-studierende .post:hover h2 a:link, .wrapper-projekte .post:hover h2 a:visited {
position: relative; }
.wrapper-studierende .post:hover h2 a:link:after, .wrapper-projekte .post:hover h2 a:visited:after {
position: absolute;
height: 1px;
background: black;
width: 100%;
right: 0;
display: block;
content: "";
margin-top: -5px; }
.wrapper-studierende .post:nth-child(4n+1) {
margin-right: 0; }
.wrapper-studierende .post img {
width: 100%;
height: auto;
transition: all 400ms;
}
.wrapper-studierende .post img:hover {
/*opacity: 0.8;*/
}
.wrapper-studierende .post .meta {
font-family: 'LetterGothicW01-Regular'; }
.wrapper-studierende .post .meta a:link {
font-family: 'LetterGothicW01-Regular'; }
.wrapper-studierende .navigation {
display: none; }
.content-studierende {
margin-top: 1em;
}
.content-studierende a:hover {
border-bottom: 1px solid white;
}
.content-studierende h2 {
margin-bottom: 1.5em;
}
/* .content-studierende h2 a:link {
font-family: 'News Gothic W01 Bold';
}*/
.content-studierende .columns {
margin-bottom: 1.5em;
}
.content-studierende .columns p a:link:after {
content: '\0020\2192';
}
.content-studierende img {
margin-bottom: 1.5em;
}
/* PROJEKTE */
.wrapper-offset-fix {
/*margin: 0 1em;*/
transform: translate(1em, 0);
}
.wrapper-projekte {
margin: 0 0em; }
.wrapper-projekte .button-group {
margin: 0 0 1.5em 0; }
.wrapper-projekte .button-group button {
background: none;
margin-right: 1.5em;
border-bottom: 1px solid black;
}
.wrapper-projekte .button-group button:hover {
position: relative;
border-bottom: 1px solid white;
}
.wrapper-projekte .button-group button:hover:after {
position: absolute;
height: 1px;
background: black;
width: 100%;
right: 0;
display: block;
content: "";
margin-top: -5px; }
.wrapper-projekte .button-group button:focus {
outline: 0;
text-decoration: none;
}
.wrapper-projekte .button-group button.active {
position: relative;
border-bottom: 1px solid white;
text-decoration: none;
}
.wrapper-projekte .button-group button.active:after {
position: absolute;
height: 1px;
background: black;
width: 100%;
right: 0;
display: block;
content: "";
margin-top: -5px;
text-decoration: none;
}
.wrapper-projekte .post {
width: 23.25%;
float: left;
margin-right: 2.3%;
margin-bottom: 2.3%; }
.wrapper-projekte .post h2 a:link {
font-family: 'News Gothic W01 Bold'; }
.wrapper-projekte .post:hover h2 a:link, .wrapper-projekte .post:hover h2 a:visited {
position: relative; }
.wrapper-projekte .post:hover h2 a:link:after, .wrapper-projekte .post:hover h2 a:visited:after {
position: absolute;
height: 1px;
background: black;
width: 100%;
right: 0;
display: block;
content: "";
margin-top: -5px; }
.wrapper-projekte .post:nth-child(4n+1) {
margin-right: 0; }
.wrapper-projekte .post img {
width: 100%;
height: auto;
transition: all 400ms;
}
.wrapper-projekte .post img:hover {
opacity: 0.8;
}
.wrapper-projekte .post .meta {
font-family: 'LetterGothicW01-Regular'; }
.wrapper-projekte .post .meta a:link {
font-family: 'LetterGothicW01-Regular'; }
.wrapper-projekte .navigation {
display: none; }
.post-link {
margin-bottom: 1%;
}
.post-link p:hover {
text-decoration: underline;
}
/* ----------------------------------------------------- smartphonish screens */
#media only screen and (max-width: 767px) {
.wrapper {
margin: 0.5em 0.5em 0 0.5em; }
.wrapper p, .wrapper .post {
width: 100%; }
.wrapper p img, .wrapper .post img {
width: 100%;
height: auto; }
.content p img.alignnone {
max-width: 100% !important; }
.wrapper-projekte {
margin: 0 0.5em 0.5em 0.5em; }
.wrapper-projekte .post {
float: none;
width: 100%;
margin-bottom: 1.5em; }
.wp-caption {
width: 100% !important; }
.wp-caption p.wp-caption-text {
font-family: 'LetterGothicW01-Regular'; }
.wp-caption img {
width: 100%;
height: auto; }
.page img {
max-width: 100% !important; } }
/* ----------------------------------------------------- desktopish screens */
#media only screen and (min-width: 1024px) {
.content-studierende h2 {
margin-bottom: 1.5em; }
.content-studierende h2 a:link {
font-family: 'News Gothic W01 Bold'; }
.content-studierende .columns {
margin-bottom: 1.5em;
max-width: 700px;
-webkit-column-count: 3;
-moz-column-count: 3;
column-count: 3; }
.content-studierende .columns p {
margin-bottom: 1.5em; }
.content-studierende img {
margin-bottom: 1.5em; }
.content p img.aligncenter {
max-width: 55vw !important;
height: auto; } }
/* -------------------------------- Browser specific CSS */
/* apply only on JavaScript enabled browsers */
/* apply only on Internet Explorer 8 */
/* apply only on Internet Explorer 9 */
/*# sourceMappingURL=style.css.map */
I'm aware that this is a very project-specific question but I simply can't make out what is causing this. Huge thanks to anyone who can help me out.
This fixed it for me in Chrome.
.wrapper-projekte .post img {
width: 100%;
height: auto;
transition: all 400ms;
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
This is happening because browser is doing antialiasing. Setting backface-visibility: hidden; to .wrapper-projekte .post img will solve this.
.wrapper-projekte .post img {
width: 100%;
height: auto;
transition: all 400ms;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
}

Chrome print preview text overlap

Need help figuring this out. I've tried adding additional margins and padding to the text and also cells in the hope it resolves but haven't been successful.
The issue only happens in chrome
Here is some code. this is the master print.css
#page
{
size: size 21cm 29.5cm portrait;
margin: 1.3cm;
}
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* -- Page Layout
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
body { padding: 0px; margin: 0px; }
div.OuterShell { width: 100%; border: none !important; padding: 0px; margin: 0px; }
div.InnerShell { width: 100%; border: none !important; padding: 0px; margin: 0px; }
div.OuterShell { box-shadow: none; }
div.CollapseButtons, .ajax__tab_outer, .TableOptions{ display:none !important; visibility:hidden; }
div.Header { display: none; }
div.Footer { display: none; }
div.ContentHolder { padding: 0px; margin: 0px; width: 100%; }
div.LeftColumn { display: none !important; }
div.RightColumn { display: none; }
div.Submit, div.HSStatusIcon, div.Banner { display: none; }
div.MiddleColumn { margin: 0 !important; padding: 0 !important; border: none; width: auto !important; display: block !important; }
div.MiddleColumn3Col { margin: 0px; border: none; width: 100%; }
div.LoginStatus { display: none; }
div.MainMenu { display: none; }
div.SubMenu { display: none; }
div.CopyrightHolder { display: none; }
div.ReportTitle { display: none; }
div.ReportControls { display: none; }
div.FloatingOptions, .PrintHide, .ActionOptions, .InformationIcons { display: none; border: none !important; }
#tdAlerts { display:none; visibility:hidden !important;}
#thAlerts { display:none; visibility:hidden !important;}
#tdOptions { display:none; visibility:hidden !important;}
td.Notes { display:none; visibility:hidden !important;}
div.crumbs {display:none;}
a.DatePicker {display:none;}
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
.PrintShow { visibility:visible !important; display:block !important; }
div.OuterShell
{
padding: 0 !important;
box-shadow: none !important;
}
div.ContentHolder
{
margin: 0 !important
}
div.MiddleColumn h1,
div.MiddleColumn3Col h1,
div.MiddleColumn1Col h1
{
color: #333333 !important;
font-family: inherit !important;
background-color: White !important;
text-transform: none !important;
font-size: 24px !important;
border-bottom: 0 !important;
}
div.InputGrid h3
{
color: #333333 !important;
background-color: #ffffff !important;
border-color: #cccccc !important;
}
div.InputGrid table
{
border-color: #cccccc !important;
}
div.InputGrid td.Label
{
border-color: #cccccc !important;
color: #333333 !important;
}
the page also pulls another print css sheet called paperwork. here it is
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* -- Setup Page for Print
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
#page
{
size: size 21cm 29.5cm portrait;
margin: 1.3cm;
}
#media print
{
body { font-family: Arial; font-size: 11pt; padding: 0px !important; }
div.PaperWorkOuterShell { width: 100% !important; padding: 0px !important; margin: 0px !important; }
div.PaperWorkInnerShell { width: 100% !important; margin: 0px !important; }
div.PageBreak { page-break-before: always; border: none !important; }
div.PageBreakFix { height:1px; overflow:hidden; font-size:0px; }
div.Warning { display: none; margin:0 !important; }
div.PaperWorkContent { margin-bottom: 30px; }
div.NoPrint { display:none; margin: 0 !important; }
}
#media screen
{
div.PaperWorkContent { margin-bottom: 20px; }
div.PageBreak { margin-bottom: 30px; border-top: 1px dashed #999; }
}
/*-----------------------------------------------------------------------------
//-- PAPERWORK LOGO CSS
//---- A client may need this in their paperwork.css to resize the coords main paperwork logos
-----------------------------------------------------------------------------*/
div.PaperWorkHeader div.Logo { width: 200px; height:70px; overflow:hidden; text-align:center; margin: 0 auto 20px; }
div.PaperWorkHeader div.Logo img { max-height:70px; max-width: 200px; }
* html div.PaperWorkHeader div.Logo { width:200px; height:70px; } /* IE6 Fix as it doesnt support max-width/height */
* html div.PaperWorkHeader div.Logo img { height:70px; width:auto; }
div.PositionRight { position: absolute; top: 0; right: 0; }
/*-----------------------------------------------------------------------------
//-- For coord's coverletter
//---- A client may need this in their paperwork.css to resize logos on coord coverletters (e.g. LEBC contracts)
-----------------------------------------------------------------------------*/
div.Coverletter div.CoverLogo { width:300px; height:100px; overflow:hidden; text-align:right; }
div.Coverletter div.CoverLogo img { max-width:300px; max-height:100px; }
* html div.PaperWorkHeader div.CoverLogo img { height:100px; width:auto; }
/*-----------------------------------------------------------------------------
//-- For admin's coverletter
//---- A client may need this in their paperwork.css to resize logos on admin specific coverletters (e.g. ELI reminders)
-----------------------------------------------------------------------------*/
div.AdminHeader div.CoverLogo { height:80px; max-height:80px; overflow:hidden; text-align:right; }
div.AdminHeader div.CoverLogo img{ height:80px; max-height:80px }
* html div.AdminHeader div.CoverLogo, * html div.AdminHeader div.CoverLogo img { height:80px; }
/* some default coverletter stlying */
div.CoverletterContent, div.Coverletter { position:relative; }
div.CoverLetterAddress { top:60px; left:0px; text-align:left; }
div.CoverLetterAddress p{ line-height:1.4em; font-size:100%; margin:0 !important; padding:0 !important; }
div.CoverLetterHeader,
div.Coverletter div.RowHolder { background:none !important; }
div.Coverletter { height:auto !important; text-align:right; }
.Window
{
margin-top:15px !important;
}
.Window-Extended
{
margin-top:20px !important;
}
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* -- Redefine HTML tags
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
body { padding: 0 20px; background: #EEE; color: #000; font-family: Arial; font-size: 10pt; }
form { padding: 0px; margin: 0px; }
hr { color: #999; border-color: #999; }
hr { color: #FFF; background: none; border-bottom: 1px solid #999; height: 1px; margin: 20px 0px 5px; padding: 0px; }
hr.Dotted { border: 0; padding: 0; border-bottom: 1px dotted #999; }
a.:link, a:visited, a:hover { color: #000; text-decoration: none; }
a.PaperworkLink:link, a.PaperworkLink:visited, a.PaperworkLink:hover { color: #006699; text-decoration: underline; }
/* fix IE7 */
*:first-child+html hr { margin: 5px 0px 0px; }
*:first-child+html hr.Top { margin-top: 10px; }
/* fix IE 6 */
* html hr { margin: 5px 0px 0px; }
* html hr.Top { margin-top: 10px; }
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* -- Paperwork Page Layout
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
div.Error img { float: left; margin: 7px; }
div.Error { position:relative; padding: 10px 10px 10px 40px; }
div.Error { color: #CC0000; border: 1px solid #E47676; margin: 0px 0px 20px; background: #FAE5E5 url('../Images/Icons/MessageBox/critical.gif') no-repeat scroll 7px 50%; }
div.Error div.Container p, div.Error div.Container h2 { background:#ea6154; }
div.Error div.Icon { background: url('../Images/Icons/MessageBox/Error_Important.png') no-repeat scroll 5px 50% !important; }
div.Error div.Icon_Lrg { background: url('../Images/Icons/MessageBox/Error_Important_Lrg.png') no-repeat scroll 0 50% !important; }
div.Error div.AreaEmployer div.Icon { background: url('../Images/Icons/MessageBox/Error_EmpArea.png') no-repeat scroll 0 50% !important; }
div.Error div.AreaEmployer div.Icon_Lrg { background: url('../Images/Icons/MessageBox/Error_EmpArea_Lrg.png') no-repeat scroll 0 50% !important; }
div.Error div.AreaPlacement div.Icon { background: url('../Images/Icons/MessageBox/Error_EmpArea.png') no-repeat scroll 0 50% !important; }
div.Error div.AreaPlacement div.Icon_Lrg { background: url('../Images/Icons/MessageBox/Error_EmpArea_Lrg.png') no-repeat scroll 0 50% !important; }
div.Warning { padding: 8px; background: #FFFFCC; border: 1px solid #CC9933; color: #990000; }
div.Declaration { padding: 8px; background: #CCCCFF; border: 1px solid #000099; color: #000066; }
div.AgreedBy { font-size: 8pt; }
div.PaperWorkOuterShell { width: 700px; padding: 20px 0px; background: #FFF; }
div.PaperWorkInnerShell { width: 650px; margin: 0px auto; background: #FFF; color: #000; }
div.PaperWorkHeader { position: relative; height:140px;}
div.Slim {height:10px !important;}
div.PaperWorkHeader div.Title { position: absolute; left: 0px; bottom: 10px; font-size: 14pt; }
div.PaperWorkHeader div.Central { position: relative; text-align: center; margin: 20px 0px 0px; }
div.PaperWorkHeader div.Central_lrebp { width:100%; text-align:center; bottom:0px; }
div.PaperWorkHeader div.Address { position: absolute; left: 0px; top: 10px; font-size: 8pt; }
div.PaperWorkHeader div.OppID, div.OppIDHS { position: absolute; right: 0px; bottom: 10px; font-size: 8pt; }
div.PaperWorkHeader div.OppID span.LeftBordered, .LeftBordered { border-left: 1px solid #CCC; margin-left: 6px; padding-left: 6px; }
div.PageNumber { position: relative; text-align:right; font-size: 8pt; }
div.PaperWorkHeader div.PageNumber { position: absolute; right: 0px; top: 10px; font-size: 8pt; }
/* This is used when a page number appears in the top right corner and the header needs to float back up to remain aligned*/
div.TopFloat { top:-30px !important; }
div.Reminder p { font-size:120%; line-height:1.5em; }
div.Reminder h1 { border:none !important; width:auto; text-decoration:underline; padding:0 !important; }
div.PaperWorkContent { font-size: 8pt; }
div.PaperWorkContent h1 { border-bottom: 3px solid #000; font-size: 12pt; padding: 5px 12px; margin: 0px; }
div.PaperWorkContent h2 { margin: 0px 0px 2px; font-size: 100%; font-weight: bold; border: none; }
div.PaperWorkContent h2.SubHeading { font-size:120% !important; margin:0 0 5px 0; }
div.PaperWorkContent p { margin: 13px 0px; }
div.PaperWorkContent ul { margin: 0px 0px 0px 15px; padding: 0px; }
/* fix IE 6/7 */
* html div.PaperWorkContent ul,
*:first-child+html div.PaperWorkContent ul { margin-left: 15px; }
.DateBottom { border-bottom: 1px dotted #999;width:100px;display:inline-block; }
/* CLEAN STYLE - KS DEV ---------------------------------------------------------------------------------------------------------------------------------------------------- */
/*Table HTML Tags*/
table { border: none; border-collapse:collapse; page-break-inside: avoid; }
table th,
table td { border: 1px solid #AAA; margin: 0 !important; padding:5px; }
table th { background-color:#ccc !important; }
/*Table Text Tags*/
table h2 { vertical-align:top !important; }
/*Table Classes*/
td.Hazards { width: 23%; }
td.Risks { width: 23%; }
td.ControlMeasures { width: 30%; }
td.EmpControl { width: 25%; }
td.Number, td.Question, td.YesNo { padding-top: 6px; padding-bottom: 6px; }
td.Number { width: 10px; vertical-align: middle; }
td.Question { font-weight: normal; width: 230px; text-align: left; }
td.YesNo { min-width: 70px;}
td.Comments { font-weight: normal; width: 260px;}
th.Question { text-align: left; }
tr.StandardAssessment img.FirstTickBox,
img.FirstTickBox { padding-left: 0px; }
tr.StandardAssessment { background-color:#ccc; }
tr.StandardAssessment img{ padding-left: 20px; }
table.HSFormTable img { padding-left: 10px; }
td.High { background-color: #FF0000; }
td.Medium { background-color: #FFFF00; }
td.Low { background-color: #00FF00; }
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* -- Paperwork Columns
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
div.RowHolder { background: #FFF; padding: 1px; }
div.RowHolder div { background: #FFF; }
div.RowHolder div.ColumnFull { margin: 3px; padding: 8px; border: 1px solid #CCC; }
div.RowHolder div.ColumnLeftWEXReqHeader { width: 46%; float: left; margin: 3px; padding: 8px; border: 1px solid #CCC; }
div.RowHolder div.ColumnRightWEXReqHeader { width: 52%; float: right; margin: 3px; padding: 8px; border: 1px solid #CCC; }
div.RowHolder div.ColumnLeft { width: 45%; float: left; margin: 3px; padding: 8px; border: 1px solid #CCC; }
div.RowHolder div.ColumnRight { width: 45%; float: right; margin: 3px; padding: 8px; border: 1px solid #CCC; }
div.RowHolder div.TableHolder { padding: 5px; }
div.RowHolder div.NoPadding { padding: 0px; margin: 0px; }
div.Cleaner { clear: both; height: 1px; font-size: 1px; border: none; margin: 0px; padding: 0px; background: transparent; }
div.RowHolder table { width: 100%; border: none; }
div.RowHolder table th,
div.RowHolder table td { border: 1px solid #666; padding: 3px 6px; }
div.RowHolder table td.Higher { height: 30px; vertical-align:top; }
div.RowHolder table th.TickOnly,
div.RowHolder table td.TickOnly { width: 16px; }
div.RowHolder table.AvailabilityReport th { background: none; border: 0; border-bottom: 1px solid #000; text-align: left; }
div.RowHolder table.AvailabilityReport td { border: 0; text-align: left; }
div.RowHolder table.AvailabilityReport tr.MonthYear { border-top: 1px solid #CCC; font-style: italic; }
div.RowHolder table.AvailabilityReport tr.FooterNote { border-top: 1px solid #000; font-style: italic; }
div.RowHolder table.AvailabilityReport tr.FooterNote td { padding-top: 10px; }
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* -- Overrides
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
.Border { border: 3px solid #000 !important; }
.BorderTop { border-top: 3px solid #000 !important; }
.BorderRight { border-right: 3px solid #000 !important; }
.NoBorder { border: none !important; }
.Central { text-align: center; }
.NoUnderline { text-decoration: none !important; }
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/* -- Padding for lists
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
ol li { padding-bottom:10px; }
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
.left { float:left; }
.right { float:right; }
.both { clear:both; }
.bold { font-weight:bold; }
.clearfix:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
.clearfix {
display: inline-block;
}
html[xmlns] .clearfix {
display: block;
}
* html .clearfix {
height: 1%;
}
.Uppercase { text-transform:uppercase; }
.red { color:Red; }
.lrgFont { font-size:120%; }
.SkillsTable ul { list-style:none; margin:0 0 0 5px !important; }
Vertical padding for specific table cells should work as long as you don't have fixed height (min-height, height).
I don't know whether I am right or not but I think you are giving fixed heights and sizes in pixels.
If you investigate, you may find that the different browsers have different default values for things like margins, padding, text size, font face, etc. That's probably what's tripping you up
also, I would be able to help you more if you share some code snippet

Media Query - page width expands when at 640px

I am having trouble with the breakpoint at 640px. For some reason the page width enlarges when it breaks at 640px and makes a huge gap to the right, almost like there is a margine there. By the look of it the problem lyes with the logo size. The browser thinks it is wider than it really is. Hopfully the code can clear it up for you so you can see what im talking about...
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Webbit Design</title>
<link rel="stylesheet" href="css/grid.css" type="text/css" media="screen">
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen">
<link rel="stylesheet" href="css/normalize.css" type="text/css" media="screen">
<link href='http://fonts.googleapis.com/css?family=Oxygen:400,300,700' rel='stylesheet' type='text/css'>
<meta name="viewport" content="width=device-width, initial-scale = 1.0, user-scalable = no">
</head>
<body>
<div class="container clearfix">
<div id="logo" class="grid_4">
<img src="img/webbit-logo.png" alt="">
</div>
<div id="nav" class="grid_8 omega">
<ul>
<li class="home">Home</li>
<li class="detail">About</li>
<li class="work">Work</li>
<li class="contact">Contact</li>
</ul>
</div>
<div id="intro-home" class="grid_12">
<h1>Welcome</h1>
<p>Bblah blah. <p></p>
</div>
<div id="copyright" class="grid_12">
<p>© Webbit Design. All Rights Reserved.</p>
</div>
</div>
</body>
</html>
/*global*/
body {
font-family: 'Oxygen', sans-serif;
font-size: 0.8em;
line-height: 25px;
background: #fff;
color: #000000;
margin: 3em 6.5em;
}
a {
color: #444;
text-decoration: none;
}
a:hover {
color: #50B748;
}
/*typography*/
h1 {
font-size: 4em;
font-weight: bold;
letter-spacing: -0.05em;
margin: 0;
line-height: 0.8em;
}
h2 {
font-size: 2.3em;
font-weight: normal;
letter-spacing: -0.05em;
margin: 0;
}
}
h3 {
font-weight: 100;
font-size: 1.125em;
color: #444;
}
p {
font-size: 1em;
line-height: 25px;
font-weight: lighter;
}
/*navigation*/
#logo {
margin: 5% 0 1% 38.6%;
}
#nav {
margin-left: 34%
}
#nav ul {
width: 100%;
margin: 8% 0 30 90;
list-style: none;
float: right;
}
#nav ul li {
float: left;
}
#nav ul li.home {
width: 15%;
}
#nav ul li.detail {
width: 15%;
}
#nav ul li.work {
width: 15%;
}
#nav ul li.contact {
width: 15%;
}
}
#nav ul li a {
color: #444;
display: block;
text-decoration: none;
}
#nav ul li a:hover {
color: #50B748;
}
/*content*/
p .quote{
font-style: italic;
}
img .quote-close{
margin-left: 50px;
}
}
#new-work {
margin-top: 2%;
}
#new-work img {
box-sizing: border-box;
border-style: solid;
border-width: 1px;
border-color: #000000;
padding: 8px;
margin: 0 0 0% 0;
}
#featured-work {
margin-top: 2%;
}
#featured-work img {
box-sizing: border-box;
border-style: solid;
border-width: 1px;
border-color: #000000;
padding: 8px;
margin: 0 0 0% 0;
}
#contact {
margin-top: 2%;
clear: both;
border-top: 1px solid #aaaaaa;
}
#contact span{
color: #50B748;
font-weight: 600;
}
#copyright {
border-top: 1px solid #aaaaaa;
padding: 2% 0;
margin: 2% 0;
margin-left: 1%;
text-align: center;
}
/* Form */
#form {
width: 90%;
background: #EEE;
padding: 20px 30px 20px 30px;
color: #444;
border:1px solid #DADADA;
}
}
#form h1>span {
display: block;
font-size: 11px;
}
#form label {
display: block;
margin: 0px 0px 5px;
}
#form label>span {
float: left;
width: 80px;
text-align: right;
padding-right: 10px;
margin-top: 10px;
color: #888;
}
#form input[type="text"], #form input[type="email"], #form textarea,#form select{
border: 1px solid #DADADA;
color: #888;
height: 24px;
margin-bottom: 16px;
margin-right: 6px;
margin-top: 2px;
outline: 0 none;
padding: 3px 3px 3px 5px;
width: 70%;
}
#form textarea{
height:100px;
}
#form .button {
background: #50B748;
border: none;
padding: 10px 25px 10px 25px;
color: #FFF;
}
#form .button:hover {
background: #444
}
/*Work*/
.work-img {
margin-top: 20px;
max-width: 100%;
}
.line {
}
/*media queries*/
/* Tablet ----------- */
#media screen and (max-width: 1024px) {
.container {
margin-right: 0;
}
#intro {
width: 100%;
}
#intro h1 {
margin: 0 0 0% 0;
}
#logo img {
margin-left: -16%;
margin-bottom: -15%;
}
#nav ul {
}
#nav ul li {
float: left;
margin: 5% 0 0 -2.5%;
}
#nav ul li.home {
width: %;
}
#nav ul li.detail {
width: %;
}
#nav ul li.work {
width: %;
}
#nav ul li.contact {
width: %;
}
}
/* Small ----------- */
#media screen and (max-width : 640px) {
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6,
.grid_7,
.grid_8,
.grid_9,
.grid_10,
.grid_11,
.grid_12 {
width:100%;
}
.container {
margin-right: 0;
}
#logo img {
max-width: 100%;
margin-right: 0;
}
#nav ul {
font-size: 1.2em;
}
#nav ul li a {
-webkit-user-select: none;
font-size: 0.750em;
}
#nav ul li {
}
#nav ul li.home {
width: 10%;
text-align: center;
}
#nav ul li.detail {
width: 20%;
text-align: center;
}
#nav ul li.work {
width: 10%;
text-align: center;
}
#nav ul li.contact {
width: 20%;
text-align: center;
}
#featured-work, #new-work {
margin: 5% 0;
}
h1 {
line-height: 0.7em;
}
The other break point seems to be fine!
Thanks
In regards to my comment above, this is what the media query should look like:
/* Small ----------- */
#media screen and (max-width : 640px) {
.grid_1,
.grid_2,
.grid_3,
.grid_4,
.grid_5,
.grid_6,
.grid_7,
.grid_8,
.grid_9,
.grid_10,
.grid_11,
.grid_12 {
width:100%;
}
.container {
margin-right: 0;
}
#logo img {
max-width: 100%;
margin-right: 0;
}
#nav ul {
font-size: 1.2em;
}
#nav ul li a {
-webkit-user-select: none;
font-size: 0.750em;
}
#nav ul li {
}
#nav ul li.home {
width: 10%;
text-align: center;
}
#nav ul li.detail {
width: 20%;
text-align: center;
}
#nav ul li.work {
width: 10%;
text-align: center;
}
#nav ul li.contact {
width: 20%;
text-align: center;
}
#featured-work, #new-work {
margin: 5% 0;
}
h1 {
line-height: 0.7em;
}
}
The logo has the class .grid_4, and the navbar has the class .grid_8, which means that at your 640px breakpoint their width is set to 100%. Coupled with their margins that will make those elements extend outside their parent container.
To fix this you'll need to override the rule that is setting their width to 100%. In your 640px media query add:
#logo, #nav {
width: auto;
}