Responsive CSS issues - html

I am using #media to have certain styles for devices. However, it is having issue for tablets and phones. I am currently using a S3 and a hd 7 memo pad tablet to test the responsive aspect of my website. when I am on landscape mode on the S3, the content is not stacked on each other. This feature I would like to have for the tablet but however it does not do it when the tablet is on landscape mode. I would like to know what I am doing wrong. Another issue I am having is the footer. When I am on my tablet, phone, or laptop, there is weird spacing when browser shrinks. I would like to know how to fix the issue. Thank You
/***********************
GENERAL
***********************/
a {
text-decoration: underline;
}
a:hover {
text-decoration: underline;
}
img {
max-width: 100%;
}
body {
/*font-family: 'Fabrica', 'Courier New';*/
font-family: 'Open Sans', sans-serif;
background-color:#e6e9ed;
color: #434a54;
}
#wrapper{
max-width:960px;
margin: 0 auto;
background-color: #f5f7fa;
overflow: auto; /*This fixed the wrapper background color problem that happened bc floating content*/
line-height: 1.8em;
}
#wrapper img {
border-radius:5px 20px 5px;
}
#wrapper p {
text-indent: 2.5em;
}
#banner {
margin-left: auto;
margin-right:auto;
padding: 0;
display:block;
clear:both;
}
#content {
padding:20px 40px;
padding-bottom:50px;
}
h1, h2, h3 {
font-family: 'Droid Serif', serif;
}
.selected {
color:#0B108C;
text-decoration: none;
}
/***********************
HEADER - Top image strip above banner
***********************/
#logo {
text-align:right;
max-height:100%;
max-width:100%;
padding: 10px 0px 10px 30px;
}
#header {
background-image: url(../img/header.jpg);
background-repeat: no-repeat;
background-position: top;
margin: 0 auto;
max-width:960px;
}
/*Commented out for testing new header technique
#header {
margin-left: auto;
margin-right: auto;
padding: 0;
display: block;
clear: both;
font-family: 'Fabrica', Arial;
}
*******/
/***********************
NAVIGATION - Main site navigation
***********************/
nav{
background-color:#4888dc;
text-align:center;
color:blue;
max-width:960px;
margin: 0 auto;
text-align:center;
font-size:1.2em;
}
nav ul{
list-style:none;
margin:0 10px; /*Can be change later on in the design if it doesn't work*/
}
nav li{
/*Inline, mostly text. Appears in the same line, inline as the rest of the text. Block
pushes other items out of the page. Inline block maintains width and
height but is in line with other images*/
display:inline-block;
list-style:none;
padding: .4em 1.5em;
}
nav a {
font-weight: 800;
}
nav a:visited, nav a:link {
color:#f5f7fa;
text-decoration: none;
}
nav a:hover {
color:#0B108C;
text-decoration: none;
}
nav ul li a.selected { /*Highlights current page for users*/
color:#0B108C;
}
/**********************
FOOTER
**********************/
footer {
font-family: 'Open Sans', sans-serif;
max-width:950px;
background-color:#434a54;
font-size:0.75em;
clear:both;
color:#e6e9ed; overflow:auto;
margin: 0 auto;
padding:5px;
}
footer h3{
padding-left: .9em;
font-family: 'Open Sans', sans-serif;
}
footer ul {
display:inline-block;
list-style-type: none;
}
footer ul li{
list-style:none;
text-decoration:none;
margin-left: 1em;
}
footer ul li a{
color:#e6e9ed;
text-decoration:none;
}
footer a:hover {
color:#FFFFFF; /*Change hover color to make it more prominent*/
}
/**********************
RIGHT SIDE OF FOOTER
**********************/
#footer-right {
float:right;
margin-right:15px;
}
.social-icon {
display:inline-block;
width:24px;
height:24px;
margin-bottom:22.7px; /*controls height of "follow us" in footer*/
padding:1px;
border-radius: 20%;
}
/**********************
LEFT SIDE OF FOOTER
**********************/
#footer-left {
float:left;
padding-left: 2em;
text-align:left;
font-size: 1.35em;
display:inline-block;
line-height: 1.5em;
}
#footer-slogan {
font-family: 'Georgia', 'Droid Serif', sans-serif;
}
#copyright{
font-size: .75em;
text-align:left;
margin-top: 5px;
display:inline-block;
font-family: 'Open Sans', sans-serif;
}
/***********************
CONTENT TEMPLATE - Content template for all other pages
***********************/
/*Responsive.css*/
/*This is the placeholder for responsive CSS that we will implement for mobile design*/
/* Smartphones ----------- */
#media screen and (max-width: 519px){
/* Styles */
#content{
float:none;
padding:0;
width: auto;
}
img{
max-width: 100%;
height: auto;
width:auto\9; /*for ie8*/
}
body{
float:left;
font-family: 'Fabrica';
}
#logo {
margin-right:auto;
max-width: 100%;
height: auto;
padding: 0;
}
#wrapper{
margin: 0 auto;
}
#wrapper p{
text-indent: 0;
}
h1, h2, h3 {
font-family: 'Fabrica';
}
nav{
position: relative;
min-height: 40px;
}
nav ul{
position:absolute;
width: 180px;
padding: 5px,0;
top: 0;
left: 0;
border: solid 1px #aaa;
background: #fff url(../img/menu-bar-mobile.jpg) no-repeat 10px 11px;
border-radius: 5px;
box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
nav ul:hover li{
display: block;
margin: 0 0 5px;
}
nav a:hover {
display:block;
}
nav li{
display:none;
margin:none;
}
#banner{
display: none;
}
footer{
font-family: 'Fabrica';
float:left;
}
}
/*Ipads and Tablets*/
#media screen and (min-width:520px) and (max-width: 959px) and (orientation: landscape){
footer{
font-family: 'Fabrica';
float: left;
}
body{
font-family: 'Fabrica';
}
#primary {
width: 55%;
float: left;
padding:10px;
}
#secondary {
width: 30%;
float: right;
padding:10px;
}
}
/* Desktops and laptops ----------- */
#media screen and (min-width: 1200px){
/* Styles */
#primary {
width: 55%;
float: left;
padding:10px;
}
#secondary {
width: 30%;
float: right;
padding:10px;
}
}
/*************************************
TWO COLUMN LAYOUT
Will target anything larger than average smartphone.
This is helpful for normal sized tablets, very large smartphones, and very small desktop windows.
***************************************/
#font-face {
font-family: 'Fabrica';
font-style: normal;
font-weight: 100;
src: local('Fabrica'), local('Fabrica'), url(path/Fabrica.otf) format('otf');
}

Looking at the media query that targets the landscape orientation, the only two elements it mentions (other than the footer), are the ones with id=primary and id=secondary. One of these is floated right, the other floated left, so they won't stack - this will cause them to float to opposite sides of the screen.
In your media query remove the floating and make sure they are both display:block - then they will stack one above the other. (Note: I assume you only have one each of the #primary and #secondary elements, since an id can only be used once on a page).

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%;
}

how change images size according to media query?

I'm trying to implement this portfolio in this link :
http://www.htmldrive.net/items/demo_show/1258
I download and implement it in my mvc5 project and it works fine,but I have some problem in css and media query used in this portfolio .I want to make some changes in size of images and number of columns when I shrink the browser . in this portfolio all images should be 144x144px in 4 columns but I don't want it . I want bigger images, also I want it worke like bootstrap grid system , but when I shrink the browser columns changed to 1 column.can anyone help me ?
I don't know anything about media query.
2 css files :
/* CSS reset */
body,div,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,textarea,p,blockquote,th,td {
margin:0;
padding:0;
}
html,body {
margin:0;
padding:0;
height: 100%;
}
img {
border:0;
}
header{
display: block;
}
/* General Demo Style */
body{
font-family: Arial, Helvetica, sans-serif;
background:url(images/bg.png);
font-size: 14px;
color: #3a2127;
}
a{
color: #333;
text-decoration: none;
}
#container{
position: relative;
}
.clr{
clear: both;
}
#container > header{
padding: 20px 20px 20px 20px;
position: relative;
display: block;
text-align: center;
}
#container > header h1{
position: relative;
color: #275973;
font-weight: 700;
font-style: normal;
font-size: 25px;
padding: 0px 0px 5px 0px;
text-shadow: 0px 1px 1px rgba(255,255,255,0.8);
}
#container > header h1 strong{
font-family: 'Open Sans Condensed','Arial Narrow', Arial, sans-serif;
padding:0px 5px 0px 5px;
line-height:35px;
color:#275973;
font-size:28px;
text-transform: uppercase;
}
#container > header h1 span{
font-family: 'Alegreya SC', Georgia, serif;
font-size: 20px;
line-height: 20px;
display: block;
font-weight: 400;
font-style: italic;
color:#5a99ba;
text-shadow: 1px 1px 1px rgba(0,0,0,0.1);
}
/* Buttom Style */
.freshdesignweb-top{
text-align:center;
color:#275973;
line-height: 44px;
font-size: 11px;
background: rgba(0, 0, 0, 0.1);
text-transform: uppercase;
position: relative;
box-shadow: 3px 0px 5px rgba(0,0,0,0.2);
}
.freshdesignweb-top a{
color:#fcca00;
}
.freshdesignweb-top a:hover{
color:#0b2f42;
}
.freshdesignweb-top h1{
margin:0 auto;
width:490px;
background:url(images/logo.png) no-repeat;
font-weight:bold;
font-family: 'Open Sans Condensed','Arial Narrow', Arial, sans-serif;
text-transform: uppercase;
font-size:36px;
text-shadow: 2px 2px 0px #F2F2F2, 1px 2px 0px #B1B1B2;
}
/* Buttom Style */
.freshdesignweb-buttom{
font-family: 'Open Sans Condensed','Arial Narrow', Arial, sans-serif;
color:#009;
line-height: 24px;
font-size: 11px;
background: rgba(0, 0, 0, 0.1);
text-transform: uppercase;
position: relative;
box-shadow: 3px 0px 5px rgba(0,0,0,0.2);
}
.freshdesignweb-buttom a{
padding: 0px 10px;
letter-spacing: 1px;
text-shadow: 0px 1px 1px #fff;
display: block;
float: left;
}
.freshdesignweb-buttom a:hover{
background:#FFF;
}
.freshdesignweb-buttom span.right{
float: right;
font-weight:bold;
}
.freshdesignweb-buttom span.right a{
display: block;
}
.freshdesignweb{
margin:0 auto;
width:650px;
}
/* Portolio Hover */
.da-thumbs li ,
.da-thumbs li img {
display: block;
position: relative;
}
.da-thumbs li {
overflow: hidden;
}
.da-thumbs li article {
position: absolute;
background-image:url(images/image_hover.png);
background-repeat:repeat;
width: 100%;
height: 100%;
}
.da-thumbs li article.da-animate {
-webkit-transition: all 0.2s ease;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
/* Initial state classes: */
.da-slideFromTop {
left: 0px;
top: -100%;
}
.da-slideFromBottom {
left: 0px;
top: 100%;
}
.da-slideFromLeft {
top: 0px;
left: -100%;
}
.da-slideFromRight {
top: 0px;
left: 100%;
}
/* Final state classes: */
.da-slideTop {
top: 0px;
}
.da-slideLeft {
left: 0px;
}
.da-thumbs li article a {
color:#fff;
padding:20px;
display:block;
}
.da-thumbs {
text-align:center;
}
.da-thumbs li article h3{
color:#fff;
padding-top:30px;
}
.da-thumbs li article em{
margin-bottom:10px;
color:#fff;
display:block;
}
.da-thumbs li article span{
display:inline-block;
}
span.link_post{
display:block;
width:35px;
height:35px;
background-color:#DF6232;
border-radius:50px;
cursor:pointer;
background-image:url(images/link_post_icon.png);
background-repeat:no-repeat;
background-position:center;
margin-right:10px;
}
span.zoom{
overflow:hidden;
display:block;
width:35px;
height:35px;
background-color:#DF6232;
border-radius:50px;
cursor:pointer;
background-image:url(images/zoom_icon.png);
background-repeat:no-repeat;
background-position:center;
margin-left:10px;
}
.portfolio_2col article h3{
padding-top:70px !important;
}
/* Image Grid */
.image_grid {
float:left;
overflow:hidden;
width:700px;
position:relative;
}
.image_grid li{
float: left;
line-height: 17px;
color: #686f74;
list-style:none;
overflow:hidden;
margin-bottom:23px;
margin-right:23px;
text-align:center;
}
/* Responsive image grid*/
/* Mobile landscape width 320 */
#media only screen and (max-width: 767px) {
.image_grid{
width:300px;
}
.image_grid li img{
width:220px;
}
.portfolio_4col .da-thumbs li article h3{
padding-top:70px;
}
.portfolio_3col .da-thumbs li article h3{
padding-top:50px;
}
.portfolio_2col .da-thumbs li article h3{
padding-top:53px !important;
}
}
#media only screen and (min-width: 480px) and (max-width: 767px) {
.image_grid{
width:450px;
}
.image_grid li{
width:178px !important;
}
.portfolio_4col .da-thumbs li article h3{
padding-top:58px;
}
.portfolio_3col .da-thumbs li article h3{
padding-top:34px;
}
.portfolio_2col .da-thumbs li article h3{
padding-top:23px !important;
}
}
You can use the same code and style in the example with larger image.
Delete or Change the width in the below style rules.
.freshdesignweb {
margin: 0 auto;
width: 650px;
}
.image_grid {
float: left;
overflow: hidden;
width: 700px;
position: relative;
}

Accordion Nav Bar Not Responsive for Mobile Devices

I was able to do the Accordion Nav bar to respond on laptop/desktop when a certain size has meant. However, it doesn't respond for any mobile devices. Another issue that I am having is it is not displaying the icon for the Accordion Menu bar for either desktop and mobile devices. Any help would be appreciated to resolve the issue I am having.
Thank you
Responsive CSS:
/*This is the placeholder for responsive CSS that we will implement for mobile design*/
/* Smartphones ----------- */
#media screen and (min-width : 240px) and (max-width: 519px){
/* Styles */
#content{
float:none;
padding:0;
width: auto;
}
img{
max-width: 100%;
height: auto;
width:auto\9; /*for ie8*/
}
body{
float:left;
font-family: 'Fabrica';
}
#logo {
margin-right:auto;
max-width: 100%;
height: auto;
padding: 0;
}
#wrapper{
margin: 0 auto;
}
#wrapper p{
text-indent: 0;
}
h1, h2, h3 {
font-family: 'Fabrica';
}
nav{
position: relative;
min-height: 40px;
}
nav ul{
position:absolute;
width: 180px;
padding: 5px,0;
top: 0;
left: 0;
border: solid 1px #aaa;
background: #fff url(.../img/menu-bar-mobile.jpg) no-repeat 10px 11px;
border-radius: 5px;
box-shadow: 0 1px 2px rgba(0,0,0,.3);
}
nav ul:hover li{
display: block;
margin: 0 0 5px;
}
nav a:hover {
display:block;
}
nav li{
display:none;
margin:none;
}
#banner{
display: none;
}
footer{
font-family: 'Fabrica';
float:left;
}
}

Unwanted horizontal scroll bar

I'm having a bit of a problem. For some reason a horizontal scroll bar keeps appearing from my code. I've tried everything but I can't seem to remove it. The following link is a live preview of the code.
http://jsfiddle.net/y5x7V/
HTML
<body>
<section class="contain">
<div id="section-nav" class="section-nav">
<div class="top">
<ul>
<li class="logo">Magna Contra</li>
<li class="active">Blog With Us</li>
<li>Compxta</li>
<li>Laurie</li>
<li>SUBTITLESOFLIFE</li>
</ul>
</div>
</div>
</section>
<div class="bg">
<h1>SUBTITLESOFLIFE</h1>
</div>
<ul class="check">
<li class="bold">Hot Trends</li>
<li class="topic">Daft Punk</li>
<li class="topic">#bbcqt</li>
<li class="topic">Petite Noir - Major</li>
<li class="topic">Alt J Album Teaser</li>
<li class="topic">Materialistic Happine$$</li>
<li class="topic">WOLF</li>
</ul>
<div class="contar">
Lorem Dosi
</div>
</body>
</html>
CSS
ul
{
list-style-type:none;
margin:0;
padding:0;
text-align: center;
}
.check{
list-style-type:none;
margin:0;
padding:0;
text-align: center;
padding-top: 10px;
padding-bottom: 10px;
width: 100%;
display: inline-block;
}
::selection{background:red;color:red;}::-moz-selection{background:red;color:red;}
li
{
display: inline;
padding:15px;
text-align: center;
margin:auto 0;
position: relative;
}
li a{
text-decoration: none;
color:#bbbbbb;
font-family: "proxima-nova",sans-serif;
text-transform: uppercase;
text-align: center;
font-size: 0.78em;
letter-spacing: .2em}
hr{
color:#dfe0db;
border: 0;
background-color: #dfe0db;
height: 1px;
}
.bold{
display: inline;
}
.bold a{
color:#e94378;
}
.topic{
display: inline;
padding:8px;
text-align: center;
margin:auto 0;
position: relative;
}
.topic a{
-webkit-transition:400ms;-moz-transition:400ms;-o-transition:400ms;transition:400ms;color:#bbb;font-weight:700;outline:0;text-decoration:none}
.topic a:hover{
color:#e94378;text-decoration:none}
}
.logo a{
color:#bbb;
font-size: 0.78em;
text-decoration: none;
text-transform: uppercase;
}
img#hv {
filter: url(filters.svg#grayscale); /* Firefox 3.5+ */
filter: gray; /* IE6-9 */
-webkit-filter: grayscale(1); /* Google Chrome & Safari 6+ */
}
img#hv:hover {
filter: none;
-webkit-filter: grayscale(0);
}
.image {position: relative; text-align: center;width:100%;height:75%;}
.image span {position: absolute; line-height: 20px; display: block; top: 50%;
margin-top: -10px; width: 100%; color: white;font-family: "proxima-nova";
text-transform: uppercase;
font-size: 1.5em; letter-spacing:;}
#media screen and (max-width:800px) {
.image span {
font-size:0.8em;
}
}
#media screen and (max-width:400px) {
.image span {
font-size:0.7em;
}
}
.bg{
background-color: #e94378;
}
img.ri
{
position: relative;
max-width: 100%;
width:100%;
display: inline-block;
vertical-align: middle;
}
#media screen and (orientation: portrait) {
img.ri { max-width: 100%; }
}
#media screen and (orientation: landscape) {
img.ri { max-height: 100%; }
}
.text{
font-family: "proxima-nova";
font-size: 1em;
letter-spacing: .2em;
text-transform: uppercase;
background-color: #e94378;
padding:20px;
color:yellow;
position: absolute;
left:200px;
bottom:50px;
}
.tex{
font-family: "proxima-nova",sans-serif;
font-size: 2.5em;
letter-spacing: 3px;
text-transform: uppercase;
bottom:160px;
left: 320px;
color:white;
padding: 10px;
}
.image{
vertical-align: middle;
}
.logo a:hover{
color:white;
}
.active a{
color:white;
}
.contain{
display: table;
width: 100%;
text-align: center;
margin: 0 auto;
}
.block {
display: table-row;
height: 1px;
}
.navigation {
display: inline-block;
padding: 10px;
width:100%;
margin: auto;
height: 150px;
}
.top {
background-color: #444;
width:100%;
display: inline-block;
padding: 10px;
text-align: center;
}
.navigation:nth-child(odd) {
background: #222;
}
.push {
height: auto;
}
.contar {
margin: 0 auto;
text-align: center;
width:100%;
height:400px;
background-color: white;
}
img.ft{
float:left;
}
.featured{
background-color: white;
width:69%;
text-align: center;
margin: 0 auto;
display: inline-block;;
}
.block:nth-child(odd) {
background: #fff;
}
.search {
border:0px;
background-color:transparent;
color:white;
display: inline-block;
height:28px;
}
.section-nav a{-webkit-transition:400ms;-moz-transition:400ms;-o-transition:400ms;transition:400ms;color:#bbb;font-weight:700;outline:0;text-decoration:none;}
.section-nav a.active,.section-nav a:hover{color:#fff;text-decoration:none}
h1{
font: 800 1em "proxima-nova", sans-serif;
font-size:3.125em;
text-align:center;
padding:10px 10px;
margin:20px 20px;
background-color:;
position: relative;
text-decoration:none;
display:inline-block;
letter-spacing: 6px;
color:yellow;}
h1 a{
text-decoration: none;
letter-spacing: 8px;
padding-left: 0.15em;
color:#a8a820;
}
.txt{
font:800 proxima-nova;
}
h2{
font: 800 1em "proxima-nova", sans-serif;
font-size:3.125em;
text-align:center;
padding:10px 10px;
margin:20px 20px;
background-color:;
position: relative;
text-decoration:none;
display:inline-block;
letter-spacing: 6px;
color:yellow;}
h2 a{
text-decoration: none;
letter-spacing: 8px;
padding-left: 0.15em;
color:#a8a820;
}
Don't use overflow-x: hidden - it only papers over the cracks, it doesn't fix the issue. You can fix it by using the box-sizing property on the top div:
.top {
background-color: #444;
width:100%;
display: inline-block;
padding: 10px;
text-align: center;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
This takes your padding: 10px into account when applying 100% width.
You can also use a polyfill to check for browser support, using the Modernizr plugin.
add
overflow-x:hidden
to the main wrapper class
This is because you're combining both 100% width and padding. If 100% width evaluates to 100px, for example, adding 5px padding to the left and right on top of that will cause your element to have an overall width of 110px. You can get around this by changing the element's box-sizing.
.bottom, .top {
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
}
JSFiddle demo.
You can set overflow-x in body to hidden
http://jsfiddle.net/y5x7V/1/
body {
line-height: 1;
text-align: center;
overflow-x: hidden;
}
You can fix this correctly rather than hacking in some CSS to hide the scrollbar by fixing the top class in your CSS. Set the padding to 0 (as it's taking the full width of the parent) by adding:
padding:0;
to .top
JSFiddle
You can set the padding's height property to get the original look, this is just a quick fix to demo why it's breaking.
Change
.top {padding:10px;}
to
.top {padding:10px 0; }
Line 261 of css you provided, change from padding: 10px;, to padding: 10px 0;.

Distance between header and page list blogger

I have a problem positioning the header and the page list on blogger. I want the distance between the header and the page list to be bigger so I tried to add the height in the header wrapper but in vain. I tried to play with margins but I failed. Please help. Here is the code :
http://alittlegirlfromparis.blogspot.com/
/* Header
-----------------------------------------------
*/
#header-wrapper {
height: 343px;
margin: auto;
padding: 0;
width: 1100px;
}
#header-inner {
float: left;
padding-left: 15px;
}
#header {
height:400px;
width: 1100px;
text-align: center;
color:#553b14;
text-shadow:1px 1px 1px #ccc;
}
#header h1 {
padding:25px 10px 10px 0px;
line-height:1.2em;
text-transform:uppercase;
letter-spacing:0em;
font: normal normal 30px 'Josefin Sans';
display:none;
}
#header a {
color:#553b14;
text-decoration:none;
}
#header a:hover {
color:#553b14;
}
#header .description {
padding:0px 10px 0px 0px;
text-transform:normal;
line-height: 1.4em;
font: normal 12px 'Josefin Sans';
color:#553b14;
}
#header img {
margin-left: auto;
margin-right: auto;
}
/* Nav
-----------------------------------------------
*/
#garis {
position: absolute;
top: 0px;
width: 1100px;
}
#PageList1 {
position: fixed;
list-style-type:none;
float:left;
width: 1100px;
font-size:14px;
background:#fff;
}
.PageList li a {
float: none;
color:#000;
text-decoration: none;
text-align:center;
font:16px 'Calibri';
}
.PageList li a:hover{
color:#b3afaf;
text-decoration:none;
}
.crosscol .PageList li, .footer .PageList li {
float:left;
list-style:none outside none;
}
.PageList li.selected a {
color:#000;
}
.PageList li.selected a:hover {
color:#b3afaf;
}
/* Outer-Wrapper
----------------------------------------------- */
#outer-wrapper {
background:#ffffff url(http://i56.tinypic.com/dnygs1.jpg) no-repeat top;
margin: auto;
width: 1100px;
text-align:left;
font: normal normal 100% Georgia, Serif;
box-shadow:0 1px 6px #000;
border-top:30px solid #000;
}
#content-wrapper {
padding-top:10px;
padding-left:10px;
padding-right:5px;
}
#main-wrapper {
float:left;
width: 800px;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
padding:5px;
border-right: 1px dashed #CCCCCC;
}
#sidebar-wrapper {
width: 250px;
float: right;
word-wrap: break-word; /* fix for long text breaking sidebar float in IE */
overflow: hidden; /* fix for long non-text content breaking IE sidebar float */
}
/* Headings
----------------------------------------------- */
h2 {
margin:1.5em 0 .75em;
font: 25px 'Trebuchet MS',Trebuchet,Arial,Verdana,Sans-serif;
line-height: 1.4em;
text-transform:normal;
letter-spacing:0em;
color:#999999;
}
/* Posts
-----------------------------------------------
*/
h2.date-header {
margin:0em 0 .75em;
font: italic 100% 'Georgia',Trebuchet,Arial,Verdana,Sans-serif;
line-height: 1.4em;
text-transform:noone;
letter-spacing:0em;
color:#999999;
}
.post {
border-bottom: 1px solid #CCCCCC;
}
.post a{
color: #666666;
text-decoration:none;
}
.post a:hover{
color: #666666;
text-decoration:none;
}
.post h1 {
padding:20px 0px 0px 5px;
font-size:20px;
font-weight:normal;
line-height:1.4em;
color:#000000;
}
.post h1 a, .post h1 a:visited, .post h1 strong {
display:block;
text-decoration:none;
color:#000000;
font-weight:normal;
}
.post h1 strong, .post h1 a:hover {
color:#8f8c97;
}
.post-body {
margin:1em 0 1em 0;
line-height:1.6em;
}
.post ul {
margin: 5px 0px 5px 20px;
padding: 0px 0px 0px 0px;
}
.post ol {
margin: 5px 0px 5px 20px;
padding: 0px 0px 0px 0px;
}
.post ol li {
margin: 5px 0px 5px 10px;
padding: 0px;
}
.post-body blockquote {
line-height:1.3em;
padding-left:32px;
padding-right:10px;
padding-top:5px;
font-size:18px;
font-family:Georgia, Serif;
font-style:italic;
color:#333;
}
.post-footer {
padding-top:10px;
margin:0;
color:#8f8c97;
text-transform:normal;
letter-spacing:0em;
font: italic 100% 'Georgia', Trebuchet, Arial, Verdana, Sans-serif;
line-height: 1.4em;
display: block;
}
.post-footer a{
color: #000;
text-decoration:none;
}
.post-footer a:hover{
color: #000;
text-decoration:underline;
}
.atas { border-top: 1px dashed #8f8c97;
color: #8f8c97;
display: block;
font: italic 100%/1.4em 'Georgia',Trebuchet,Arial,Verdana,Sans-serif;
letter-spacing: 0;
margin: 10px 0 0;
padding: 3px;
}
.atas a{
color: #382e2a;
text-decoration:none;
}
.atas a:hover{
color: #382e2a;
text-decoration:underline;
}
.comment-link {
float: right;
margin-left:.6em;
padding-left: 20px;
background: url(http://2.bp.blogspot.com/-u3jiNrwSNbw/Tg_NI-7myPI/AAAAAAAAA3A/ALpTb3CCdSw/s000/cm.gif) no-repeat;
margin-left:.6em;
}
.post img {
background:#fff;
padding:2px;
border:1px solid #cccccc;
}
.post blockquote {
margin:1em 5px;
}
.post blockquote p {
margin:.75em 0;
}
Can you be more specific about what you're attempting to change? The #sidebar-wrapper and #main-wrapper are separate sections, as is the #header-wrapper. To reposition any one of these all that is needed is to adjust the element in the appropriate direction (top, bottom, margin, padding, height). To add whitespace between the header and both elements, adding height to #header-wrapper does the trick. To move the side menu down, add margin-top to the #sidebar-wrapper (or padding-top).
You can increase padding-top of #content-wrapper in your CSS. This will make all content below the header image to go down in the layout.
You can add padding-top to #sidebar-wrapper in your CSS. This will make the right menu only to move down in the layout.