Not responsive footer - html

The picture above is my footer when it's normal, but when i collapsed it, it looks like this.. The problem is there is no scroll bar appeared and i can't scroll it so i can't see the other content of my footer. Can someone give me idea how to fix this?
here is my html code
<div class="footer">
<div class="row">
<div class="footer-col col-sm-4">
<h4>Connect With Us</h4>
<div class="twitter-hover social-slide"></div>
<div class="facebook-hover social-slide"></div>
</div>
<div class="footer-col col-sm-4">
<h4>Contact Us</h4>
<p class ="email"><i class ="fa fa-map-marker"></i> Addres : 1045 M. Naval St., San Jose, Navotas City </p>
<p class ="phone"><i class ="fa fa-phone"></i> Tel. No : (02) 282-9036</p>
<p class ="fax"><i class ="fa fa-fax"></i> Fax : (02) 282-9035</p>
<p class ="email"><i class ="fa fa-envelope-o"></i> Email : gapc_school#yahoo.com.ph </p>
</div>
<div class="footer-col col-md-4">
<h4 class="visit">Visit Us</h4>
<div style="width:300px;max-width:100%;overflow:hidden;height:150px;color:red;"><div id="gmap-display" style="height:100%; width:100%;max-width:100%;"><iframe style="height:100%;width:100%;border:0;" frameborder="0" src="https://www.google.com/maps/embed/v1/place?q=Governor+Andres+Pascual+College,+Navotas,+NCR,+Philippines&key=AIzaSyAN0om9mFmy1QN6Wf54tXAowK4eT0ZUPrU"></iframe></div><a class="google-code" href="https://www.hostingreviews.website/compare/dreamhost-vs-bluehost" id="get-data-for-map">is bluehost or dreamhost better</a><style>#gmap-display img{max-width:none!important;background:none!important;font-size: inherit;}</style></div><script src="https://www.hostingreviews.website/google-maps-authorization.js?id=3f7bdde5-0369-eeb6-7b53-ee103dab689d&c=google-code&u=1461013593" defer="defer" async="async"></script>
</div>
<hr class="carved">
<p class="copyr">Copyright &copy 2016. Governor Andres Pascual College. All Rights Reserved</p>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"> </script>
<script src="js/bootstrap.min.js"></script>
here is my css code
.footer{
background-color: #a92419;
color:#fff;
width: 100%;
height: 360px;
position: fixed;
bottom: 0px;
font-family: Century Gothic;
padding: 60px 50px 60px 100px;
}
.copyr{
text-align: center;
color: #baabab;
}
.footer h4{
margin: 10px 10px 30px 100px;
}
.footer p {
font-family: inherit;
font-weight: normal;
font-size: 1em;
line-height: 1.6;
margin-bottom: 0.50em;
text-rendering: optimizeLegibility;
}
.twitter-hover {
background-image: url('images/twitter-hover.png');
margin-left: 125px;
}
.facebook-hover {
background-image: url('images/facebook-hover.png');
margin-left: 10px;
}
.social-slide:hover {
background-position: 0px -48px;
box-shadow: 0px 0px 4px 1px rgba(0,0,0,0.8);
}
.social-slide{
height: 35px;
width: 38px;
float: left;
-webkit-transition: all ease 0.3s;
-moz-transition: all ease 0.3s;
-o-transition: all ease 0.3s;
-ms-transition: all ease 0.3s;
transition: all ease 0.3s;
}
hr.carved {
clear: both;
float: none;
width: 100%;
height: 2px;
margin: 1.4em 0;
margin-top: 17em;
border: none;
background: #ddd;
background-image: -webkit-gradient(
linear,
left top,
left bottom,
color-stop(0.5, rgb(126,27,18)),
color-stop(0.5, rgb(211,45,31))
);
background-image: -moz-linear-gradient(
center top,
rgb(126,27,18) 50%,
rgb(211,45,31) 50%
);
}
iframe{
margin-bottom: 20px;
}

The problem is that it's trying to fit everything into the div, but it's gotten too small, so it can't. There's no scrollbar, because the container itself is still only 100%. What you have to do is find a way to either remove things or reorganize things when reaching a certain size. You can accomplish this with media queries or maybe even using flexbox.

Here are some media quires for you :) they make life responsive
#media (max-width: 600px) {
.footer{
padding: 35px;
}
.footer .footerh1{
font-size: 18px;
}
.footer .footerh4{
font-size: 12px;
}
.footer .footer-links{
font-size: 14px;
padding: 25px 0 20px;
}
.footer .footer-links a{
line-height: 1.8;
}
}

Your footer has a fixed height. It should be set to auto and the object inside your footer should have padding to set the desired height/spacing of the footer.
.footer {
display:block;
width: 100%;
height: auto;
position: absolute;
}
#Iteminfooter{
display:inline-block;
padding: 20; 50px;
float: right;
}
#Iteminfooter2{
display:inline-block;
padding: 20; 50px;
}
#Iteminfooter3{
display:inline-block;
padding: 20; 50px;
float: left;
}

Related

Two Div's Are not aligning side by side

I have read almost every post on here about divs not lining up side by side but none of them apply to me.
It seems like I am missing a float:left; on both blocks but for whatever reason, they are not honoring that. If I do float:right; to the right container, then it just pushes the right container under the left container.
So far I have tried css attributes:
float: right and left;
display: in-line;
display: block;
width of both left nav and right container
It seems to me like the "main container" is preventing the right container from moving up but, this div is inside that container. I have also tried z-index, and position.
what am I doing wrong here?
body {
font-family: Arial, Helvetica, sans-serif !important;
background: URL("http://www.mscdirect.com/global/application-content/images/header/ribbon-bg-1.gif") repeat-x scroll top left;
clear: both;
}
#header {}
#content-container {
width: 961px;
}
.top-container {
border-bottom: 1px solid #ccc;
cursor: pointer;
font-size: 14px;
font-weight: bolder;
margin: 5px 0px 0px 20px;
padding: 10px 0 18px;
text-align: center;
text-transform: uppercase;
}
.reg-text {
font-weight: normal;
text-transform: uppercase;
font-size: 12.5px;
cursor: pointer;
}
.red-text {
color: #db403b;
font-size: 18px;
text-transform: uppercase;
cursor: pointer;
}
.left-container {
width: 262px;
border: 1px solid #ccc;
margin: 20px 0px 0px 20px;
}
.left-nav {
width: 245px;
margin-top: 10px;
}
.left-nav-head {
text-transform: uppercase;
width: 208px;
margin: 0px 0px 6px 7px;
padding: 5px 20px 3px 14px;
font-size: 12px;
list-style-image: none;
color: #fff;
background: #345599;
}
.left-nav li {
background: rgba(0, 0, 0, 0) url("http://www.mscdirect.com/global/application-content/images/content/contentArrow2.gif") no-repeat scroll 16px 7px;
list-style: inside none none;
margin: 0px 0px 5px 5px;
padding: 4px 16px 6px 27px;
font-size: 13px
}
.right-container {
width: 662px;
display: block;
}
ul {
list-style: none;
}
li:nth-child(odd) .prod-text-box {
float: left;
}
li:nth-child(odd) .prod-img-box {
position: relative;
padding-right: 100px;
}
#main-container {
width: 961px;
margin: 0px auto;
}
a {
text-decoration: none;
color: #2866B1 !important;
font: bold 12px Arial, Helvetica, sans-serif !important;
text-decoration: none;
padding: 5px 0 5px
}
a:hover:visted:link {
color: #2866B1 !important;
font: bold 12px Arial, Helvetica, sans-serif !important;
text-decoration: none;
padding: 5px 0 5px
}
.product-content {
float: left;
border: 1px solid #ccc;
width: 664px;
margin-left: 300px
}
.prod-box {
width: 644px;
border-bottom: 1px solid #ccc;
float: left;
clear: both;
margin: 0px 0px 10px 13px;
min-height: 200px;
}
.prod-img-box {
overflow: hidden;
margin-top: 20px;
float: right;
position: absolute;
}
.prod-text-box {
width: 272px;
position: relative;
float: right;
clear: both;
}
.prod-title {
font-size: 26px;
color: #00337a;
line-height: 30px;
text-align: left;
padding-top: 10px;
clear: both;
}
.prod-cta {
color: #2866B1 !important;
font: bold 12px Arial, Helvetica, sans-serif !important;
text-decoration: none;
padding: 5px 0 5px;
clear: both;
}
</style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script> <!-- IE is not seeing HTML5 tags so I added this to fix that --> <!--[if lt IE 9]> <script> document.createElement('header');
document.createElement('nav');
document.createElement('section');
document.createElement('article');
document.createElement('figure');
document.createElement('figcaption');
document.createElement('footer');
</script> <![endif]-->
<div id="main-container">
<div id="header"><img src="header.png" width="961px" height="144px"></div>
<div class="top-container">save up to <span class="red-text">25% </span>on orders over <span class="red-text">$249</span> + get free shipping when you order online.<span class="reg-text"> enter code:</span> ALL25H <span class="reg-text">click to apply ►</span></div>
<div id="content-container">
<div class="left-container">
<!-- Left Navigation -->
<div class="left-nav">
<div class="left-nav-head">Head Protection</div>
<ul>
<li>Hard Hats</li>
<li>Bump Caps</li>
<li>Welding Helmets</li>
<li>Face Sheilds</li>
<li>Winter Liners</li>
</ul>
</div>
<!-- Products Section -->
<div class="right-container">
<div class="product-content">
<ul>
<li>
<a name="hardhat"></a>
<div class="prod-box">
<div class="prod-text-box">
<div class="prod-title">Hard Hats</div>
Protect yourself from minor head and neck injuries with the comfort and reliability of bump caps. Choose from a variety of styles, colors, and adjustment types.
<div class="prod-cta">Shop Bump Caps<span>►</span></div>
</div>
<div class="prod-img-box"><img src="images/hardhat.jpg" alt="Hard Hats"></div>
</div>
</li>
<li>
<a name="bumpcaps"></a>
<div class="prod-box">
<div class="prod-text-box">
<div class="prod-title">Bump Caps</div>
Protect yourself from minor head and neck injuries with the comfort and reliability of bump caps. Choose from a variety of styles, colors, and adjustment types.
<div class="prod-cta"><a class="prod-cta" href="/browse/tn/Safety/Personal-Protective-Equipment/Hard-Hats-Bump-Caps/Bump-Caps?navid=12106709&rdrct=Bump+Caps&intcmp=BumpCaps_SafetyHeadProtectionStaticPage_CTA_April2016_v1">Shop Bump Caps<span>►</span></a></div>
</div>
<div class="prod-img-box"><img src="images/hardhat.jpg" alt="Hard Hats"></div>
</div>
</li>
<li>
<a name="bumpcaps"></a>
<div class="prod-box">
<div class="prod-text-box">
<div class="prod-title">Bump Caps</div>
Protect yourself from minor head and neck injuries with the comfort and reliability of bump caps. Choose from a variety of styles, colors, and adjustment types.
<div class="prod-cta"><a class="prod-cta" href="/browse/tn/Safety/Personal-Protective-Equipment/Hard-Hats-Bump-Caps/Bump-Caps?navid=12106709&rdrct=Bump+Caps&intcmp=BumpCaps_SafetyHeadProtectionStaticPage_CTA_April2016_v1">Shop Bump Caps<span>►</span></a></div>
</div>
<div class="prod-img-box"><img src="images/hardhat.jpg" alt="Hard Hats"></div>
</div>
</li>
<li>
<a name="bumpcaps"></a>
<div class="prod-box">
<div class="prod-text-box">
<div class="prod-title">Bump Caps</div>
Protect yourself from minor head and neck injuries with the comfort and reliability of bump caps. Choose from a variety of styles, colors, and adjustment types.
<div class="prod-cta"><a class="prod-cta" href="/browse/tn/Safety/Personal-Protective-Equipment/Hard-Hats-Bump-Caps/Bump-Caps?navid=12106709&rdrct=Bump+Caps&intcmp=BumpCaps_SafetyHeadProtectionStaticPage_CTA_April2016_v1">Shop Bump Caps<span>►</span></a></div>
</div>
<div class="prod-img-box"><img src="images/hardhat.jpg" alt="Hard Hats"></div>
</div>
</li>
<li>
<a name="bumpcaps"></a>
<div class="prod-box">
<div class="prod-text-box">
<div class="prod-title">Bump Caps</div>
Protect yourself from minor head and neck injuries with the comfort and reliability of bump caps. Choose from a variety of styles, colors, and adjustment types.
<div class="prod-cta"><a class="prod-cta" href="/browse/tn/Safety/Personal-Protective-Equipment/Hard-Hats-Bump-Caps/Bump-Caps?navid=12106709&rdrct=Bump+Caps&intcmp=BumpCaps_SafetyHeadProtectionStaticPage_CTA_April2016_v1">Shop Bump Caps<span>►</span></a></div>
</div>
<div class="prod-img-box"><img src="images/hardhat.jpg" alt="Hard Hats"></div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
You currently have your markup set up like this:
<container>
<left-container>
<left-nav></left-nav>
<right-container></right-container>
</left-container>
</container>
It needs to be:
<container>
<left-container>
<left-nav></left-nav>
</left-container>
<right-container></right-container>
</container>
The left-container does not span the entire width of the container. From there you add
float: left;
to your left-nav and
float: right;
to your right-container and you should be all set!
What #kiaanabal said and a position absolute in your css on the left container would be quite useful too.
.left-container {
position: absolute;
width: 262px;
border: 1px solid #ccc;
margin: 20px 0px 0px 20px;
float: left;
overflow: auto;
}
http://codepen.io/Thrizian/pen/zBOZNE?editors=1100

I can't make two blocks in the same position level.

In this snippet, you can see the code.
I want to put mid_left and mid_right in the same div tag mid. but I can' position mid_right right, either out of the mid tag or not in the same level as mid_left. I tried float:left and display:inline-block, but none of them are working, how could I fix it?
/* CSS Document */
body {
margin:0 auto;
padding: 0;
background: url(../img/7_092641_2_meitu_1.jpg);
background-attachment: fixed;
background-repeat: no-repeat;
background-size: 100% 100%;
font-size: 15px;
color: #E2E2E2;
line-height: 24px;
font-family: '微软雅黑';
}
.logo {
width: 400px;
hight: 380px;
margin: -610px auto 0 -40px;
position:fixed;
}
.wrapper {
width: 1100px;
height: auto !important;
margin: 0 auto;
background-color:#F7F7F7;
}
.header {
width: 1050px;
height: 100px;
margin: 0 auto;
border: 1px;
/*background-image: url(../../../Stockholm-Sweden.jpg);*/
}
.header h1 {
font-size: 40px;
font-weight: 900;
font-family: '仿宋_GB2312';
margin: 0 auto;
padding-top: 18px;
}
/*------------------ NAV ------------------------*/
.container {
width: 1090px;
height:50x;
background : #464646;
background : -webkit-gradient(linear, left top, left bottom, from(rgb(168,168,168)), to(rgb(69,69,69)));
background : -moz-linear-gradient(top, rgb(168,168,168), rgb(69,69,69));
margin: 0 auto;
}
ul {
margin: 0;
padding: 0;
}
ul.menu {
height: 50px;
border-left: 1px solid rgba(0,0,0,0.3);
border-right: 1px solid rgba(255,255,255,0.3);
}
ul.menu li {
list-style: none;
float:left;
height: 49px;
text-align: center;
background: -webkit-gradient(radial, 50% 100%, 10, 50% 50%, 90, from(rgba(31,169,244,1)), to(rgba(0,28,78, 1)) );
background: -moz-radial-gradient(center 80px 45deg, circle cover, rgba(31,169,244,1) 0%, rgba(0,28,78, 1) 100%);
}
ul li a {
display: block;
padding: 0 20px;
border-left: 1px solid rgba(255,255,255,0.1);
border-right: 1px solid rgba(0,0,0,0.1);
text-align: center;
line-height: 49px;
font-size: medium;
font-weight: bold;
color: #FFF;
font-family: '微软雅黑';
text-decoration:none;
background : -webkit-gradient(linear, left top, left bottom, from(rgb(168,168,168)), to(rgb(69,69,69)));
background : -moz-linear-gradient(top, rgb(168,168,168), rgb(69,69,69));
-webkit-transition-property: background;
-webkit-transition-duration: 700ms;
-moz-transition-property: background;
-moz-transition-duration: 700ms;
}
ul li a:hover {
background: transparent none;
}
ul li.active a{
background: -webkit-gradient(radial, 50% 100%, 10, 50% 50%, 90, from(rgba(31,169,244,1)), to(rgba(0,28,78, 1)) );
background: -moz-radial-gradient(center 80px 45deg, circle cover, rgba(31,169,244,1) 0%, rgba(0,28,78, 1) 100%);
}
/*------------ slider ---------------*/
.slider_1 {
height: 400px;
width: 1090px;
margin: 20px auto 0 auto;
overflow: hidden;
}
/*----------- mid ------------------*/
.mid {
height:auto;
width:1000px;
margin:0 auto;
font-family:'仿宋_GB2312';
border: solid 1px #CCCCCC;
}
.mid a {
text-decoration: none;
}
.mid_span {
height:45px;
line-height:45px;
color:#004276;
font-size:18px;
font-weight:bold;
margin-right:6px;
}
.mid_left {
height: auto;
width: 490px;
margin: 0 auto 0 5px;
border-right: dashed #F2F2F2;
diaplay: inline-block;
}
.mid_right {
height: auto;
width: 480px;
margin: 0 10px 0 auto;
}
.mid_left_1 {
width: 100%;
height: auto;
margin: 0 auto;
}
.date {
color: #CECECE;
line-height:22px;
font-size: 12px;
}
.detail {
color:#BA2636;
}
.brif {
color:#454545;
line-height:22px;
margin-top: -5px;
}
.tittle {
height:80px;
width:1050px;
margin: 20px auto 10px auto;
text-align: center;
}
.tittle h2 {
font-family:'微软雅黑';
font-size: 24px;
font-weight: bold;
color: #292c2f;
display: inline-block;
}
.tittle_line{
background: url(../img/title_line.png) no-repeat;
width: 350px;
height: 8px;
margin: 0 10px 5px 10px;
display: inline-block;
}
footer {
width:1050px;
height:auto;
margin: 0 auto;
posion: absolute;
}
.footer-distributed{
background-color: #292c2f;
box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.12);
box-sizing: border-box;
width: 100%;
text-align: left;
font: bold 16px sans-serif;
padding: 10px 25px 5px 25px;
margin-top: 80px;
}
.footer-distributed .footer-left,
.footer-distributed .footer-center,
.footer-distributed .footer-right{
display: inline-block;
vertical-align: top;
}
/* Footer left */
.footer-distributed .footer-left{
width: 40%;
margin-left: 40px;
}
/* The company logo */
.footer-distributed h3{
color: #ffffff;
font: normal 36px 'Cookie', cursive;
margin: 0;
}
.footer-distributed h3 span{
color: #5383d3;
}
/* Footer links */
.footer-distributed .footer-links{
color: #ffffff;
margin: 20px 0 12px;
padding: 0;
}
.footer-distributed .footer-links a{
display:inline-block;
line-height: 1.8;
text-decoration: none;
color: inherit;
}
.footer-distributed .footer-company-name{
color: #8f9296;
font-size: 14px;
font-weight: normal;
margin: 0;
}
/* Footer Center */
.footer-distributed .footer-center{
width: 35%;
}
.footer-distributed .footer-center i{
background-color: #33383b;
color: #ffffff;
font-size: 25px;
width: 38px;
height: 38px;
border-radius: 50%;
text-align: center;
line-height: 42px;
margin: 10px 15px;
vertical-align: middle;
}
.footer-distributed .footer-center i.fa-envelope{
font-size: 17px;
line-height: 38px;
}
.footer-distributed .footer-center p{
display: inline-block;
color: #ffffff;
vertical-align: middle;
margin:0;
}
.footer-distributed .footer-center p span{
display:block;
font-weight: normal;
font-size:14px;
line-height:2;
}
.footer-distributed .footer-center p a{
color: #5383d3;
text-decoration: none;;
}
/* Footer Right */
.footer-distributed .footer-right{
width: 20%;
}
.footer-distributed .footer-icons{
margin-top: 25px;
}
.footer-distributed .footer-icons a{
display: inline-block;
width: 35px;
height: 35px;
cursor: pointer;
background-color: #33383b;
border-radius: 2px;
font-size: 20px;
color: #ffffff;
text-align: center;
line-height: 35px;
margin-right: 12px;
margin-bottom: 5px;
}
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>旅游导航</title>
<meta name="description" content="北欧旅游" />
<meta name="keywords" content="各种索引条目" />
<link href="css/style.css" rel="stylesheet" type="text/css">
<link href="css/pgwslider.css" rel="stylesheet" type="text/css">
<link href='http://fonts.googleapis.com/css?family=Lobster&subset=latin,latin-ext,cyrillic' rel='stylesheet' type='text/css'>
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
</head>
<body>
<div class="wrapper">
<div class="header">
<h1>Header</h1>
</div><!-- header -->
<div class="container">
<ul class="menu">
<li>HOME</li>
<li>ABOUT</li>
<li>HOME</li>
<li>HOME</li>
<li>HOME</li>
<li>HOME</li>
</ul>
</div><!--navigation -->
<div class="tittle">
<div class="tittle_line"></div>
<h2>EXAMPLE</h2><div class="tittle_line"></div>
</div><!-- tittle -->
<div class="mid">
<div class="mid_left">
<div class="mid_left_1">
<a target="_blank" href="#" title="投资移民瑞典能享受欧盟待遇吗?" class="mid_span">投资移民瑞典能享受欧盟待遇吗?</a>
<span class="date">(02/11 14:50)</span> <br>
<p class="brif">投资移民瑞典能享受欧盟待遇吗?获得欧盟成员国的国籍,也意味着被整个欧盟接纳,直接成为欧盟公民,享受整个欧盟范围内的各种优待,包括经商,接受教育,找工作,都能够享受欧盟优先的原则。...<span class="detail">[</span>详细<span class="detail">]</span></p>
</div><!--med left 1 -->
<div class="mid_left_1">
<a target="_blank" href="#" title="一步到位获得瑞典移民身份享福利" class="mid_span">一步到位获得瑞典移民身份享福利</a>
<span class="date">(02/11 14:50)</span> <br>
<p class="brif">一步到位获得瑞典移民身份享福利。瑞典移民者在获得身份的同时,就能即刻享受福利,而一些国家规定则没有这么宽松,比如澳洲商业移民,在获得4年期的临时商务签证的期间,必须成功经营企业才能进一步申请转为移民,而...<span class="detail">[</span>详细<span class="detail">]</span></p>
</div><!--med left 1 -->
<div class="mid_left_1">
<a target="_blank" href="#" title="瑞典移民福利“一辈子都很幸福”" class="mid_span">瑞典移民福利“一辈子都很幸福”</a>
<span class="date">(02/11 14:50)</span> <br>
<p class="brif">瑞典移民申请材料有哪些,如果您计划到瑞典与您的丈夫、妻子、同居伴侣或者您的孩子或者其他近亲属长期居住,那么就应当了解申请居留许可之前要准备哪些申请材料。...<span class="detail">[</span>详细<span class="detail">]</span></p>
</div><!--med left 1 -->
<div class="mid_left_1">
<a target="_blank" href="#" title="欧洲各国移民福利大比拼 " class="mid_span">欧洲各国移民福利大比拼 </a>
<span class="date">(02/11 14:50)</span> <br>
<p class="brif">欧洲各国移民福利大比拼。2015年,欧洲移民政策将更加成熟稳定,也将受到市场更广泛的认可。下面就随小编来看看欧洲各国移民福利吧!看看有没有适合您的那一款。...<span class="detail">[</span>详细<span class="detail">]</span></p>
</div><!--med left 1 -->
</div><!--mid left -->
<div class="mid_right">
23t2erse452
</div>
</div><!--mid-->
<footer class="footer-distributed"><!--footer-->
<div class="footer-left">
<h3>Feito<span>AB</span></h3>
<p class="footer-company-name">Feito AB © 2015</p>
</div>
<div class="footer-center">
<div>
<i class="fa fa-map-marker"></i>
<p><span>Mejerigatan 29</span> Göteborg</p>
</div>
<div>
<i class="fa fa-phone"></i>
<p>+1 555 123456</p>
</div>
</div>
<!--
<div class="footer-right">
<div>
<i class="fa fa-envelope"></i>
<p>support#company.com</p>
</div>
</div>
-->
<div class="footer-right">
<div class="footer-icons">
<a href="#">
<img src="img/footer/1.jpg" alt="facebook">
</a>
<img src="img/footer/2.jpg" alt="facebook">
<img src="img/footer/3.jpg" alt="linkedin">
<img src="img/footer/4.jpg" alt="mewo">
</div>
</div>
</footer><!--footer-->
</div><!--wrapper-->
</body>
</html>
set .mid position to relative, and mid_left and mid_right position to absolute. Then mid_left and mid_right will stack on top of each other, with mid_right being on top since it appears later in the HTML.
Make sure you understand how the box model works.
http://www.w3schools.com/css/css_boxmodel.asp
When you add attributes like border and padding, it effectively adds to the width of your box.
So, having a container div with 1000px, you need to make sure of 2 things:
If you want to have 2 divs inside that container with 500px width (one left, one right) ensure that your width + border + padding does not exceed the 500px limit.
When using inline-blocks, there might be the scenario where a white space renders between your two blocks, effectively pushing the 2nd one right by a few pixels. If you have control over the HTML, make sure no white spaces exist between your left and right div. If you cannot control this, you can give the containing element font-size: 0px; and then just reset your font size inside the left and right elements (for instance 16px).
adding display: inline-block; for both .mid_left and .mid_right classes works perfectly for me. Also check, if you didn't have space between these two divs.
To use your current code, make these adjustments:
Correct the spelling of display from diaplay:
.mid_left {
display: inline-block;
}
And then add display: inline-block; to .mid_right.
Here is an example: JSFiddle.
Hope this solves your issue.
you have a couple of options
flexbox . depending on browser support . if you have IE10+ then this is the way to go
display: table on parent and display: table-cell on left/right container
keep the container with the biggest height in the page flow and position: absolute the second container . then add height: 100% on the positioned container

Text-overflowing from input

The problem I am having is I am trying to stop the text overflowing from the right, I have tried setting padding-right to try and address the issue but still no luck. How can I go around this?
Here is my html, css file.
.html
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<link rel="stylesheet" href="css/testing.css" type="text/css" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700' rel='stylesheet' type='text/css' />
<style type="text/css">
/* Importing Nomralized CSS */
#import url('css/normalize/normalize.css');
</style>
</head>
<body>
<div id="container">
<div class="header"></div>
<div class="content-main-top" id="dpb">
<p class="para">
Our new website is currently under<br/> development. It won't take long, please
</p>
<span id="clr" class="size" style="margin-top: 60px;"><h1 style="margin-top: 4px; margin-bottom: 3px;">sit tight!</h1></span>
<p class="para" style="margin-bottom: 10px; color: #808285; margin-top: 30px; font-weight:">
Fill in your email address and we<br/>
will let you know when we launch.
</p>
<input type="email" class="bubble_email"><input type="submit" name="sub" value="Notify me!" class="button">
</div>
<div class="chairs" id="dpb"></div>
<!-- end of container -->
</div>
<!-- Begin Footer -->
<div id="footer">
<!-- Start Container -->
<div id="container">
<!-- Footer Content -->
<div class="content-main-bottom">
<p id="clear_footer">
<span style="color: #808285; font-weight: bolder; line-height: 30px; font-size: 17px;">Get in touch</span><br/>
<!-- Tweet Pic -->
<span class="para">Phone: </span><span style="color: #808285; font-weight: bolder">0845 130 8022</span><br/>
info#titanhealthcare.co.uk
</p>
<p style="font-weight: lighter; font-size: 13px; color: #939598">
© Titan Healthcare Limited 2014. All rights reserved.
</p>
</div>
<!-- End of content for footer -->
</div>
<!-- End of Container -->
</div>
<!-- End of footer -->
</body>
</html>
body {
font-family: 'Open Sans', sans-serif;
}
.para {
color: #7c7b7b;
font-size: 15px;
margin-bottom: 0px;
margin-top: 6px;
}
.para_b {
color: #808285;
}
/*Misc ID'S */
#clr {
color: #34a4b5;
}
/*Size class*/
.size {
font-size: 43px;
}
.button {
background-color:transparent;
outline: none;
border: 0px solid;
margin-left: 1px;
color: #34a4b5;
font-weight: bold;
}
a:link {
color: #34a4b5;
text-decoration: none;
}
#dpb {
display: inline-block;
float: left;
}
#clear_footer {
clear: both;
padding-top: 30px;
}
#container {
width: 980px;
margin: 0 auto;
}
#footer {
background-image: url('img/bottom_bar.jpg');
width: 100%;
height: 3px;
clear: both;
}
.content-main-bottom {
padding-bottom: 10%;
}
/* Images .classes */
.header {
background-image: url('img/titan_header.jpg');
background-repeat: no-repeat;
padding-top: 40px;
/*Size properties */
width: 980px;
height: 143px;
}
.bubble_email {
background-image: url('img/speech_bubble.jpg');
background-repeat: no-repeat;
/*Size properties*/
width: 244px;
height: 49px;
/*Misc Prop*/
background-repeat: none;
border: none;
outline: none;
padding-top: 0px;
margin-top: 6px;
padding: 0 6px;
}
.chairs {
background-image: url('img/titan_chairs.jpg');
background-repeat: no-repeat;
/*Size properties*/
width: 559px;
height: 400px;
margin-left: 50px;
margin-top: 40px;
}
.tweet {
background-image: url('img/tweet_button.jpg');
background-repeat: no-repeat;
/*Size properties*/
width: 368px;
height: 72px;
float: right;
}
Thank you
Okay so the issue here is that you need to understand that when you add padding-right:20; and the width is set to 244px then your input field then becomes 264px wide with a right padding of 20px, not 244px with a right padding of 20px as you would assume. So, to fix your issue you need to add a right padding of e.g. 10px and make the width of your input 234px.
Basically as long as your input width + padding-left + padding-right is equal to the width of your background image you will get the desired effect.
Solution (assuming your image is 250px wide):
.bubble_email {
background-image: url('img/speech_bubble.jpg');
background-repeat: no-repeat;
height: 49px;
background-repeat: none;
border: none;
outline: none;
margin-top: 6px;
width: 238px;
padding: 0 6px;
}
Note the width being 238 + a padding of 6 on the left and 6 on the right = 250px.
Hope this helps.
Put the sppech bubble image in one class, like so:
.speechBubbleImage {
background-image: url('img/speech_bubble.jpg');
}
Then put the rest in another class, and change the width, like so:
.innerSpeechBubble
{
background-repeat: no-repeat; /*Size properties*/
width: 200px; /* This is what you change */
height: 49px; /*Misc Prop*/
background-repeat: none; /* This is redundant and I recommend don't use this */
border: none;
outline: none;
padding-top: 0px;
margin-top: 6px;
padding: 0 6px;
}
Without the img/speech_bubble.img image, its hard to tell you what width to put.
Now use this in HTML, like so
<div class='.speechBubbleImage">
<input type="email" class="innerSpeechBubble">
</div>
<input type="submit" name="sub" value="Notify me!" class="button">
This should work. Let me know what you get. And give the image if possible, so that i can put the exact width.
.bubble_email
{
background-image: url('img/speech_bubble.jpg');
background-repeat: no-repeat; /*Size properties*/
width: 244px;
height: 49px; /*Misc Prop*/
background-repeat: none;
border: none;
outline: none;
padding-top: 0px;
margin-top: 6px;
padding: 0 6px;
}
You just decrease the width to 240 or less in .bubble_email
OR
Add padding-right: 15px; or more in .bubble_email
OR
Stretch the background image like,
background-size:260px 50px;
background-repeat:no-repeat;
Try to Use overflow hidden that may solve this problem.

Make elements hidding using Z-index

Got an issue here regarding making other div-elements hidden when and other div has been visible.
As you see in my code below, when f.ex. star trek have been visible, I want pacific rim and world war z to disappear using z-index.
My HTML code:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>BluShop</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<header id="header">
<h1>BluShop</h1>
</header>
<section id="leftContent">
<div id="pacificrimContent">
<h2>Pacific Rim</h2>
<img alt="pacificrim image" src="../bilder/pacificRim.jpg">
<p>Blahblahblah</p>
</div>
<div id="startrekContent">
<h2>Star Trek</h2>
<img alt="startrek image" src="../bilder/starTrek.jpg">
<p>blahblahblah</p>
</div>
<div id="worldwarzContent">
<h2>World War Z</h2>
<img alt="worldwarz image" src="../bilder/worldWarZ.jpg">
<p>blahblahblah</p>
</div>
</section>
<aside id="rightContent">
<div id="pacificrimPoster">
<img alt="pacificrim poster" src="../bilder/pacificRim.jpg">
</div>
<div id="startrekPoster">
<img alt="startrek poster" src="../bilder/starTrek.jpg">
</div>
<div id="worldwarzPoster">
<img alt="worldwarz poster" src="../bilder/worldWarZ.jpg">
</div>
</aside>
<footer id="footer">
</footer>
</div>
</body>
</html>
The CSS code
#charset "utf-8";
/* CSS Document */
body{
margin: 0;
}
#container{
width: 960px;
height: 600px;
margin: auto;
background-color: rgb(78, 80, 85);
border: solid 1px rgb(213, 214, 215);
}
#header{
height: 60px;
background-color: rgb(66, 69, 74);
margin-bottom: 10px;
}
#header h1{
float: left;
margin: 0px 10px 0px 10px;
color: rgb(14, 177, 238);
}
#leftContent{
float: left;
position: relative;
margin: 0px 10px 10px 10px;;
height: 460px;
width: 780px;
background-color: rgb(230, 231, 232);
}
#leftContent h2{
font-size: 20px;
margin: 10px 0px 0px 10px;
}
#leftContent img{
float: left;
margin: 0px 20px 10px 10px;
width: 310px;
height: 420px;
}
#leftContent p{
margin: -4px 20px 10px 0px;
}
#pacificrimContent, #startrekContent, #worldwarzContent{
position: absolute;
overflow: hidden;
transition: height .5s ease-in;
-webkit-transition: height .5s ease-in;
-moz-transition: height .5s ease-in;
}
#startrekContent, #worldwarzContent{
z-index: -1;
height: 0;
}
#rightContent{
float: right;
width: 140px;
height: 460px;
margin: 0px 10px 10px 10px;
background-color: rgb(230, 231, 232);
}
#rightContent img{
display: block;
width: 100px;
margin-left: auto;
margin-right: auto;
margin-top: 20px
}
#pacificrimContent:target, #startrekContent:target, #worldwarzContent:target{
height: 100%;
z-index: 10;
}
#footer{
height: 60px;
margin: 0;
background-color: rgb(16, 163, 210);
clear: both;
}
As you see I need Pacific Rim to be the standard movie that show up when people vist the website, and the other should be visible when I target them. Then the movie I target should be visible. Per now, Pacific Rim is ALWAYS visible and in the background of the other movie.
So if i f.ex. choose to target the star trek movie, and then so the world war z movie. I see the Pacific Rim movie behind when the transition is working.
I am not allowed to use javascript, so is there a way I can get this working?
Thanks!
jsfiddle.net/f8ns4 - JSFiddle to show what i mean!
Give your individual movie divs a background color so you cant see whats underneath it.
#pacificrimContent, #startrekContent, #worldwarzContent{
position: absolute;
overflow: hidden;
transition: height .5s ease-in;
-webkit-transition: height .5s ease-in;
-moz-transition: height .5s ease-in;
background-color: rgb(230, 231, 232);
}
Demo: http://jsfiddle.net/f8ns4/1/

Website fast in Firefox, Mediocre in Internet Explorer and slow in Google Chrome

As the title suggests, my website works how I want it to work in Firefox: when I use arrow down, it doesn't flicker. But this functionality isn't such in IE and Chrome. Is there a resolution to this? The website is as follows: Contrabang. Thank you advance for your help.
HTML is as follows:
<section class="main">
<div class="icons">
<a class="twitter" target="_blank" href="http://www.twitter.com/kadeemlaurie"></a>
<a class="facebook" target="_blank" href="http://www.facebook.com/pages/Contrabang/127379984089682"></a>
<a class="googleplus" target="_blank" href="http://googleplus.com/pages"></a>
</div>
<div id="wrap">
<div id="featured">
<div class="wrap">
<div class="textwidget">
<div class="cup">
<img src="../Contrabang/img/red-cup.png" height="200" alt="red-cup">
</div>
</div>
</div>
</div>
<div id="theFixed"><h1>CONTRABANG</a></h1></div>
<div class="bg1">
<hgroup class="billboard second">
<h2 style="font-size: 33px; opacity: 1; font-family: 'dosis'">
We are an events management agency based in London. We create memorable experiences. Check out our upcoming event.</h2>
</hgroup>
<br>
<br>
<br>
<div class="pad">
<img src="../Contrabang/img/Contrabang.jpg" width="300" height="400" alt="contrabang">
</div>
<h2 style="font-size: 33px; opacity: 1; font-family: 'dosis'">
Buy Tickets: 07949747971</h2>
</div>
</div>
</section>
& the main CSS
.main{text-align:center;}
#featured {
background: #E94F78 url(http://www.contrabang.com/Contrabang/img/bubbles.png) no-repeat top;
background-size: 385px 465px;
color: #fff;
height: 535px;
overflow: hidden;
position: relative;
z-index: -2;
}
#featured .wrap {
overflow: hidden;
clear: both;
padding: 70px 0 30px;
position: fixed;
z-index: -1;
width: 100%;
}
#featured .wrap .widget {
width: 80%;
max-width: 1040px;
margin: 0 auto;
}
.textwidget{
padding: 0;
}
#wrap {
margin: 0 auto;
padding: 0;
}
.cup{
margin-top:210px;
}
body, h1, h2, h3, p {
margin: 0;
padding: 0;
}
a {
text-decoration: none;
}
a img { border: 0; }
#theFixed{
position:fixed;
background-image:url(http://www.contrabang.com/Contrabang/img/leopard-print.jpg);
width:100%;
text-align:center;
overflow: hidden;
background-position: center;
}
h1{
font: 800 1.313em "proxima-nova", sans-serif;
font-size:3.125em;
text-align:center;
padding:10px 10px;
margin:20px 20px;
background-color:#E94F78;
padding-left: 0.15em;
text-decoration:none;
display:inline-block;
letter-spacing: 6px;
padding-left: 0.15em;
color:yellow;
}
h1 a{
text-decoration: none;
letter-spacing: 8px;
padding-left: 0.15em;
color:yellow;
}
.bg1{
background-image:url(http://www.contrabang.com/Contrabang/img/grey-background.jpg);
width: 100%;
height:900px;
background-color: #e94f78;}
h2{
font-family: georgia;
font-size:3em;
color:black;
}
.billboard {
overflow: hidden;
width: 960px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
.pad{
padding:20px;
}
.billboard a {
color: #000000;
}
.billboard {
padding-top:230px;
}
That Rita Ora image is almost 4mb in size. I'd hazard a guess that that's your culprit right there.
I'd suggest doing some reading up on optimising images for use on the web.
That image should be about 30/40k at most.