CSS Navbar Breaking (width 100%, wraps around onto next line) - html

I'm working on an aspx master page, and my nav bar is wrapping around even though the width adds up to 100%. What is throwing this off, I've had it work on other projects?
Snippet:
/*General Styling*/
html,
body {
margin: 0;
padding: 0;
height: 100%;
}
#wrapper {
min-height: 100%;
position: relative;
}
.clear:before,
.clear:after {
content: " ";
display: table;
}
/*Header Styling*/
/*Banner Styling*/
#banner {
text-align: center;
border-bottom: 1px solid purple;
}
#banner h1 {
color: blue;
}
#banner h5 {
color: red;
}
/*Nav Styling*/
#nav {
height: 100px;
border-bottom: 1px solid black;
}
.nav-item {
margin: 0;
padding: 0;
display: block;
list-style-type: none;
height: 100%;
}
.nav-child {
overflow: hidden;
font-size: 15px;
border-right: 1px solid green;
float: left;
height: 100%;
text-align: center;
width: 16%;
}
.nav-child:first-child {
width: 20%;
}
/*Content Styling*/
#content {
padding-bottom: 35px;
}
/*Footer Styling*/
#footer {
width: 100%;
border-top: 1px solid orange;
height: 35px;
position: absolute;
bottom: 0;
left: 0;
}
<!-- Start Wrapper -->
<div id="wrapper">
<!-- Start Header -->
<div id="header">
<div id="banner">
<h1>BETTER</h1>
<h5>Battling Elemental Titans Through Exercise Training</h5>
</div>
<!-- Start Navigation Bar -->
<div id="nav" class="clear">
<ul class="nav-item">
<li class="nav-child">
<asp:label ID="exercisePointLabel" runat="server">EP: 500</asp:label>
<br />
Add Exercise Points
</li>
<li class="nav-child">
Home
</li>
<li class="nav-child">
Battle
</li>
<li class="nav-child">
Hall of Legends
</li>
<li class="nav-child">
Settings
</li>
<li class="nav-child">
Logout
</li>
</ul>
</div>
<!-- End Navigation Bar -->
</div>
<!-- End Header -->
<!-- Start Content -->
<div id="content">
<!-- Start Titan Sidebar -->
<div id="titans">
<div class="titan-block">titan block</div>
<div class="titan-block">+<br /><span class="createTitan">(create new titan)</span>
</div>
<div class="titan-block">+<br /><span class="createTitan">(create new titan)</span>
</div>
<div class="titan-block">+<br /><span class="createTitan">(create new titan)</span>
</div>
</div>
<!-- End Titan Sidebar -->
<!-- Start Content Placeholder -->
<form id="form1" runat="server">
<div id="body">
<asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
<!-- End Content Placeholder -->
</div>
<!-- End Content -->
<!-- Start Footer -->
<div id="footer">
<div class="footer-text">© 2016</div>
</div>
<!-- End Footer -->
</div>
<!-- End Wrapper -->
If someone could please help that would be amazing. This is driving me crazy. I'm trying to build a website where the banner is, obviously, a banner, with heading and subheading. Followed by a navbar where the first child is an info box slightly wider than the other children, with 5 true navigation elements.
This will then be followed by content, which consists of a left aligned "titan" section, which occupies 100% height down to the footer, with a right aligned "content placeholder" section, also 100% height down to the footer.

It's the border-right you have.
You should add box-sizing: border-box; to fix this.
.nav-child {
overflow:hidden;
font-size:15px;
border-right:1px solid green;
float:left;
height:100%;
text-align:center;
width:16%;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
}

Here is another solution for this.
Replace this style in your css file:
.nav-child:first-child {
/* width: 20%; Remove this style */
}
.nav-item {
display: table;
height: 100%;
list-style-type: none;
margin: 0;
padding: 0;
}
.nav-child {
border-right: 1px solid #008000;
display: table-cell;
font-size: 15px;
height: 100%;
overflow: hidden;
text-align: center;
vertical-align: middle;
width: 1%;
}
Demo: https://jsfiddle.net/4bfg0p18/2/

Related

Why won't the margin on the top change?

I am trying to edit the margin on the nav bar links, however when I change the margin, nothing happens. Does anyone know why this is happening?
/* Whole Page or not one specific section */
main {
text-align: center;
}
body {
max-width: 100%;
height: 100vh;
margin: 0px 0px 0px 0px;
color: #C2D3CD;
}
.topbar, nav {
background-color: #847E89;
}
/* Top Bar */
#temp-logo, #donate-top {
display: inline-block;
}
#donate-top {
float: right;
padding-right: 2%;
padding-left: 2%;
background-color: #C2D3CD;
color: #847E89;
height: 10vh;
cursor: pointer;
}
.donate-name {
padding-top: 4vh;
background-color: #C2D3CD;
border: none;
cursor: pointer;
}
#temp-logo {
padding-top: 0vh;
margin-left: 2%;
font-size: 22px;
}
.topbar {
display: block;
border-bottom: solid 1px #C2D3CD;
height: 10vh;
}
/* Nav Bar */
nav {
text-align: center;
height: 7vh;
}
.link, link:visited {
color: #C2D3CD;
text-decoration: none;
}
#mission-link, #about-link, #donations-link, #contact-link {
margin-top: 5%;
}
/* First Page */
#home-screen {
background-image: url(Images/beach-background-1-NEW.jpg);
height: 80vh;
width: 100%;
background-repeat: no-repeat;
background-size: 100%;
}
.text {
padding-top: 30vh;
}
/* Gallery */
.img {
width: 20vw;
height: 20vw;
}
.desc {
display: inline-block;
position: relative;
margin: 1%;
}
.desc:hover img {
filter: blur(1.5px) brightness(60%);
transition: 0.3s;
box-shadow: 0 0 10px gray;
}
.desc :not(img) {
position: absolute;
top: 37%;
z-index: 1;
text-align: center;
width: 100%;
color: #FFF;
opacity: 0;
transition: 0.3s;
}
.desc:hover :not(img) {
opacity: 1;
}
.img:hover {
transform: scale(1.1);
}
<!DOCTYPE html>
<html>
<head>
<link href="main.css" rel="stylesheet">
<title>Conejo Teen Organization</title>
</head>
<body>
<!-- Top Bar -->
<div class="topbar">
<!-- Get logo ASAP -->
<p id="temp-logo"><em>Conejo Teen Organization</em></p>
<a id="donate-top" class="donate" href="#"><button class="donate-name">Donate</button></a>
</div>
<!-- Nav -->
<nav>
<a id="mission-link" class="link" href="#">Mission</a>
<a id="about-link" class="link" href="#">About Us</a>
<a id="donations-link" class="link" href="#">What We Do</a>
<a id="contact-link" class="link" href="#">Contact</a>
</nav>
<!-- Main -->
<main>
<!-- First Section -->
<section id="home-screen">
<article class="text">
<h1 id="h1">Conejo Teen Organization</h1>
<p id="h1-desc">Helping California teens in need since 2017</p>
<button id="donate-home" class="donate">Donate Now!</button>
</article>
</section>
<!-- Our Mission -->
<section id="mission">
<h2 id="mission-h2">Our Mission</h2>
<p id="mission-statement">Our goal is to identify organizations and individuals in need, and assist in the most effective and appropriate way. In addition, the specific objective and purpose of Conejo Teen Organization shall be to provitde teens in an opportunity to learn about, perform and be engaged in community service activities. We want to provide a safe outlet and positive culture for teens to engage with other like-minded teens and mentors.</p>
</section>
<!-- Image Gallery (images of projects) -->
<section id="gallery">
<h2 id="images">Gallery</h2>
<!-- Put service images here. On hover, enlarge image and put text overlay with link to that project -->
<div class="row1 row">
<!-- Image 1 -->
<div class="desc-1 desc">
<img src="Gallery/DecMyRoom-1-Edit.jpg" class="img img-1">
<h3 id="img-desc">Dec My Room</h3>
</div>
<!-- Image 2 -->
<div class="desc desc-2">
<img src="Gallery/DecMyRoom-2-Edit.jpg" class="img img-2">
<h3 id="img-desc">Dec My Room</h3>
</div>
<!-- Image 3 -->
<div class="desc desc-1">
<img src="Gallery/DecMyRoom-3-Edit.jpg" class="img img-3">
<h3 id="img-desc">Dec My Room</h3>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer>
<p id="copyright">&copy 2018 Conejo Teen Organization</p>
<p id="my-credit">Created by Jacob Pieczynski</p>
</footer>
</body>
</html>
You're trying to apply margin-top to inline elements which you can't do since it would disrupt the flow of the page:
#mission-link, #about-link, #donations-link, #contact-link {
display: inline-block; /* Try making them inline block */
margin-top: 5%;
}
Try making the links inline-block.
Add display: inline-block like:
#mission-link, #about-link, #donations-link, #contact-link {
margin-top: 5%;
display: inline-block;
}
I have checked your code remove: height: 10vh; from topbar class

place a footer element to the bottom of a div without using margin - bootstrap

I am trying to place footer to the bottom of a div using bootstrap without applying margin to the div I want to push to the bottom of the div as footer. This is my attempt but the footer aligns to the top
<div style="background-color:#191919;" class="container">
<h3 style="color: #32CD32; font-family: Copperplate; align:left;">
HEADER TEXT
</h3>
<h5>... reaching out</h5>
<hr style="width:101.6%;">
<div class="col-lg-12">
<nav id="main_menu">
<div align="center" class="menu_wrap">
</div>
</nav>
<div class="row">
<div class="contents">
The contents in each page
</div>
</div>
<footer style="color:#fff; text-align:center;"> &copy 2016 All rights reserved
<br> For more information visit our website
</footer>
</div>
</div>
Please how can I place the footer to the bottom of .
There are multiple ways to do that, i think the faster way for you is this case is using position: absolute on the footer;
First move out you footer from .col-lg-12 to be a directly children of .container. I also added a class .myFooter
<footer class="myFooter">
copy 2016 All rights reserved
<p>You can visit our website for more info</p>
</footer>
And then the css. Don't use css inline on the markup. I moved the color and text-align to the class.
.myFooter {
color:#fff;
text-align:center;
position: absolute;
bottom: 0;
}
The last step is to add position:relative to the .container. That way the position:absolute on .myFooter works properly.
.container {
position: relative;
}
Here is a working example:
http://plnkr.co/edit/Ypl82cdqxuHFIjAcpRo8?p=preview
<html>
<head>
<title>
Lugah Salisu Foundation
</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<style type="text/css">
#media (max-width: #screen-xs) {
body{font-size: 10px;}
}
#media (max-width: #screen-sm) {
body{font-size: 14px;}
}
h3{
font-size: 300%;
margin-bottom: 0px;
clear: both;
margin-left: 7px;
}
h5{
margin-top: 0px;
padding: 0px;
margin-left: 15px;
color: #fff;
margin-bottom: 1px;
clear: both;
}
hr{
margin: 0px;
}
.container {
width: auto;
margin-left: 200px;
margin-right: 200px;
height:500px;
max-height:500px !important;
padding-left: 0px;
}
.nav>li {
position: relative;
display: inline-block!important;
}
.nav>li>a:focus, .nav>li>a:hover {
text-decoration: none;
background-color:transparent!important;
color:#d3d3d3;
}
.nav>li>a {
padding: 10px 4px!important;
color:#fff;
}
.golden-base {
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-weight:bold;
-webkit-margin-before: 0.3em;
-webkit-margin-after: 0.2em;
}
.golden1 {
background-image: -webkit-linear-gradient(#FFF65C, #3A2C00);
text-shadow: -0.02em -0.03em 0.005em rgba(255, 223, 0, 0.60);
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
/* Set the fixed height of the footer here */
height: 60px;
background-color: #f5f5f5;
}
</style>
</head>
<body style="background-color:#1f5060;">
<div style="background-color:#191919;" class="container">
<h3 style="color: #32CD32; font-family: Copperplate; align:left;">
HEADER TEXT
</h3>
<h5>... reaching out</h5> <hr style="width:101.6%;">
<div class="col-lg-12">
<nav id="main_menu">
<div align="center" class="menu_wrap"></div>
<ul class="nav sf-menu">
<li class="sub-menu"><small>Home</small></li> |
</ul>
</div>
</div>
</nav>
<footer style="color:#fff; text-align:center;"> &copy 2016 All rights reserved
<div class="row">
<div class="contents">
The contents in each page
</div>
</div>
</div>
</footer>
</body>
</html>

HTML/CSS Footer division into columns

I'm designing a website, and I'm currently trying to do the part regarding the footer. So far I haven't had any troubles, till I decided to do the footer layout.
To be precise: I want to divide the footer into three separate columns as shown on the image below:
Yet the outcome is this:
As you can see, the footer column does not hold it's width and just stretches to the content. For different settings other things happened, but it never appeared proper to me.
My current, non working approach:
HTML
<html>
<!-- BEGIN HEAD -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="style.css" />
<!-- Start WOWSlider.com HEAD section -->
<link rel="stylesheet" type="text/css" href="engine0/style.css" />
<script type="text/javascript" src="engine0/jquery.js"></script>
<!-- End WOWSlider.com HEAD section -->
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body>
<!-- BEGIN WRAPPER FOR FOOTER PUSHING -->
<div class="wrapper">
<!-- BEGIN .PAGE -->
<div class="page">
<!-- BEGIN .LOGO -->
<div class="logo">
<img class="logoBB" src="images/logo.png">
<br><text class="logosub">Tworzymy Dla Ciebie</text></br>
</div>
<!-- END .LOGO -->
<!-- BEGIN .MENU -->
<div class="menu">
<hr class="top_line">
<ul>
<li>O NAS</li>
<li>GALERIA PRODUKTÓW</li>
<li>AKTUALNOŚCI</li>
<li>ZADAJ PYTANIE</li>
<li>KONTAKT</li>
</ul>
<hr class="bottom_line">
</div>
<!-- END .MENU -->
<!-- Start WOWSlider.com BODY section --> <!-- add to the <body> of your page -->
<div id="wowslider-container0">
<div class="ws_images"><ul>
<li><img src="data0/images/slide1.png" alt="http://wowslider.net/" title="WOOD" id="wows0_0"/></li>
<li><img src="data0/images/3025992posterpdesignwork.jpg" alt="CUBES" title="CUBES" id="wows0_1"/></li>
</ul></div>
<div class="ws_bullets"><div>
<span><img src="data0/tooltips/slide1.png" alt="WOOD"/>1</span>
<span><img src="data0/tooltips/3025992posterpdesignwork.jpg" alt="CUBES"/>2</span>
</div></div><div class="ws_script" style="position:absolute;left:-99%">wowslider.com by WOWSlider.com v8.6</div>
<div class="ws_shadow"></div>
</div>
<script type="text/javascript" src="engine0/wowslider.js"></script>
<script type="text/javascript" src="engine0/script.js"></script>
<!-- End WOWSlider.com BODY section -->
</div>
<!-- END .PAGE -->
<!-- FOOTER PUSHER -->
<div class="push"></div>
</div>
<!-- END .WRAPPER -->
<!-- BEGIN FOOTER -->
<div class="footer">
<!-- BEGIN FOOTER CONTAINER -->
<div class="footer_container">
<!-- BEGIN .FINDUS -->
<div class="findus">
</div>
<!-- END .FINDUS -->
<!-- BEGIN .DESIGNERS -->
<div class="designers">
</div>
<!-- END .DESIGNERS -->
<!-- BEGIN .INSPIRATIONS -->
<div class="inspirations">
</div>
<!-- END .INSPIRATIONS -->
</div>
<!-- END FOOTER CONTAINER -->
</div>
<!-- END FOOTER -->
</body>
<!-- END BODY -->
CSS
/* GENERAL PAGE SETTINGS */
* {
margin: 0;
padding: 0;
}
.page {
margin: 25px auto;
width: 960px;
}
/* WRAPPER & HTML SETTINGS */
html, body {
height: 100%;
}
.wrapper {
min-height: 100%;
height: auto !important;
height: 100%;
margin: 0 auto -168px;
}
.footer, .push {
height: 168px; /* .push must be the same height as .footer */
}
/* FOOTER SETTINGS */
.footer {
clear: both;
width: 100%;
background-color: #323232;
}
.footer_container {
width: 960px;
margin: 0 auto;
background-color: red;
}
.footer .findus {
float: left;
width: 33,33333%;
}
.footer .designers {
float: left;
width: 33,33333%;
background-color: red;
}
.footer .inspirations {
float: left;
width: 33,33333%;
}
/* LOGO SETTINGS */
img.logoBB {
margin: 0 28.95833333333333%;
}
.logosub {
font-family: Federant;
font-size: 17.83px;
color: #94979b;
padding: 0 40.625%;
}
/* MENU SETTINGS */
.menu {
margin: 0 90px;
}
.menu ul {
text-align: center;
list-style-type: none;
margin: 17px auto;
}
.menu li {
display: inline-block;
}
.menu a {
color: black;
text-decoration: none;
font-family: slabo;
font-size: 18px;
}
.menu .top_line {
width: 780px;
margin: 32px 0 0;
height: 2px;
color: black;
background-color: black;
}
.menu .bottom_line {
width: 780px;
margin: 0 0 40px;
height: 3px;
color: black;
background-color: black;
}
What I have tried (none worked):
Applying table to a footer
Using left, right and center float (in that order) with both % values and pixel values
Tried fixed values of everything in footer (this worked) yet I'm aiming to make this website responsive so that is not the way to go by any means.
If you happen to notice any other mistakes I have made, I'd be grateful for pointing them out.
Your footer columns need to have position: relative for them to become columns. Also, you have commas in your width percentages that need to be decimals. So each footer css would be as follows (with their correct class names, of course--I just grabbed one as an example):
.footer .inspirations {
float: left;
width: 33.33333%;
position: relative;
}
See Codepen
.findus, .designers, .inspirations{
display:inline-block;
position:relative;
width:calc(100% / 3);
}
Also, your three footer divs are inside the .footer_contatiner div, which has a max-width set to it. Put them outside the wrapper if you want it to extend 100% of the page width.
Try using inline / inline-block. You'd just change a few lines in the container and in each column:
.footer_container {
width: 960px;
margin: 0 auto;
background-color: red;
display: inline;
}
.footer .findus {
display: inline-block;
width: 33,33333%;
}
.footer .designers {
display: inline-block;
width: 33,33333%;
background-color: red;
}
.footer .inspirations {
display: inline-block;
width: 33,33333%;
}

<nav> won't abide to body

I'm really not sure that my title is correct english. Hehe. But fortunately I can explain my problem in pictures ;-)
My problem is this:
body {
font: calibri;
background-color: #2d2e29;
margin-left: 150px;
margin-right: 150px;
margin-bottom: 0px;
margin-top: 0px;
}
p {
margin: 0px;
}
nav {
position: fixed;
width: 100%;
height: 80px;
background-color: #FFFFFF;
opacity: 0.75;
top: 0;
left: 0;
margin-left: 150px;
margin-right: 150px;
}
nav ul {
float: right;
list-style-type: none;
padding: 0;
margin-top: 30px;
margin-right: 30%;
}
nav li {
display: inline;
}
nav a {
margin: 5px;
color: black;
}
nav a:hover {
color: #99cccc;
}
#Forside {
background-color: #3f5c93;
height: 800px;
}
#Mig {
background-color: #ccc2a6;
height: 800px;
}
#Faerdigheder {
background-color: #3f5c93;
height: 800px;
}
#Projekter {
background-color: #ccc2a6;
height: 800px;
text-align: center;
margin-left: auto;
margin-right: auto;
}
#Kontakt {
background-color: #3f5c93;
height: 800px;
text-align: center;
margin-left: auto;
margin-right: auto;
}
#logo {
height: 100%;
width: 200px;
background: url("Logo.png");
margin-top: 10px;
margin-left: 50px;
background-repeat: no-repeat;
position: absolute;
background-size: 200px;
}
<div id="all">
<nav>
<!-- navigations-element (menu) -->
<div id="logo"></div>
<ul>
<li>
<!-- internt link: relativ URL -->
<a class="nav" href="#Forside">
Forside
</a>
</li>
<li>
<!-- internt link: relativ URL -->
<a class="nav" href="#Mig">
Mig
</a>
</li>
<li>
<!-- internt link: relativ URL -->
<a class="nav" href="#Faerdigheder">
Færdigheder
</a>
</li>
<li>
<!-- internt link: relativ URL -->
<a class="nav" href="#Projekter">
Projekter
</a>
</li>
<li>
<!-- internt link: relativ URL -->
<a class="nav" href="#Kontakt">
Kontakt
</a>
</li>
</ul>
</nav>
<div id="Forside">
<br>
<br>
<br>
<br>
<br>Forside
</div>
<div id="Mig">
<br>
<br>
<br>
<br>
<br>
<div class="meleft">
<h1>Mig</h1>
<p class="textleft">Lots of words
</p>
</div>
<div class="meright">
<img src="sdp.png" alt="sdp" id="sdp1" />
</div>
</div>
<div id="Faerdigheder">
<br>
<br>
<br>
<br>
<br>
<div class="skillsleft">
<img src="Collage1.png" alt="Collage" id="Collage" />
</div>
<div class="skillsright">
<h1>Færdigheder</h1>
<p class="textright">Lots of words
</p>
</div>
</div>
</div>
I added my code to fiddle, so you can see the problem:
http://jsfiddle.net/9Lj6ck3L/
I hope you can understand the code even though some words is in Danish :-)
Given the HTML and CSS provided, set the width of the nav to calc(100% - 300px);
Demo Fiddle
Otherwise you are telling it to be the full viewport width, offset from the left by 150px which is why it seems to overspill to the right. Using calc you can say, "fine, stretch to the viewport width, but minus the margins"
Working fiddle - http://jsfiddle.net/9Lj6ck3L/11/
Changed width of your header bar.
nav {
position:fixed;
width:63.5%;
height:80px;
background-color:#FFFFFF;
opacity:0.75;
top:0;
left:0;
margin-left:150px;
margin-right:150px;
}
Hope this helps.
Your problem is position:fixed. This element does not inherit anything from it's parent in terms of width.
Your best bet would be to wrap the nav in another <div> and make that position fixed. Then give the <nav> inside it the width that you want.
Move the <nav> outside of the #all div and put your margins on #all instead of the body.
Then give your <nav> css of box-sizing: content-box or box-sizing: padding-box to solve the width issue.

Why are my columns wrapping?

I had a quick question about a website I am currently taking from design into code. I am using a simple grid layout with a few fixed-width columns, but for some reason when the browser wraps below 1500 pixels, the columns start wrapping. I'm super confused as to why this is happening as I have a width set on my container and the columns are fixed-width.
Here is a link to the site on my staging server: http://staging.slackrmedia.com/halfpast/
Here is a link to a jsFiddle: http://jsfiddle.net/PaFKW/
please note the "external resources" located in the jsFiddle
Here is the code:
HTML:
<body class="transition">
<div class="container center">
<header class="row">
<div class="col-1-3-fixed">
<nav>
<ul class="inline text-left">
<li>
The Chronique
</li>
<li>
Boutiques
</li>
</ul><!-- .inline .text-left -->
</nav>
</div><!-- .col-1-3-fixed -->
<div class="col-1-3-fixed">
<a href="">
<img src="http://staging.slackrmedia.com/halfpast/images/logo.png" class="img-center transition" alt="HalfPast Logo" />
</a>
</div><!-- .col-1-3-fixed -->
<div class="col-1-3-fixed">
<ul class="inline text-right">
<li>
Login
</li>
<li>
Register
</li>
</ul><!-- .inline .text-right -->
<nav>
<ul class="inline text-right">
<li>
Reviews
</li>
<li>
Features
</li>
</ul><!-- .inline .text-right -->
</nav>
</div><!-- .col-1-3-fixed -->
</header><!-- .row -->
</div><!-- .container .center -->
<div class="row">
<div class="col-1 masthead background-cover">
<div class="container center">
<h1 class="text-center">Use HalfPast to find local luxury watch dealers.</h1>
<h2 class="text-center">Register below or log in here</h2>
<form action="" class="center">
<input type="text" name="name" placeholder="First & Last Name:" />
<input type="email" name="email" placeholder="Email Address:" />
<input type="password" name="password" placeholder="Password:" />
<input type="submit" value="Create your account" class="btn" />
</form>
</div><!-- .container .center -->
</div><!-- .col-1 -->
</div><!-- .row -->
<div class="row how-does-halfpast">
<div class="container center">
<div class="col-1-fixed">
<img src="http://staging.slackrmedia.com/halfpast/images/seperator.png" />
<h1 class="tk-ltc-bodoni-175 text-center">How does HalfPast work?</1>
</div><!-- .col-1-fixed -->
<div class="col-1-2-fixed">
<img src="http://staging.slackrmedia.com/halfpast/images/imac.png" />
</div><!-- .col-1-2-fixed -->
<div class="col-1-2-fixed">
<p><span class="text-red">HalfPast works with brands and retailers to simplify the way you shop for luxury watches</span></p>
<p>Browse through our articles and request "Product Details" to connect with our network of manufacturer authorized dealers.</p>
<p>HalfPast will anonymously submit your request to your local authorized dealer, who will respond with additional information. Our service introduces you to high-quality retailers and allows you to engage with them in a low-pressure environment.</p>
<p>Authenticity is guaranteed.</p>
</div><!-- .col-1-2-fixed -->
</div><!-- .container .center -->
</div><!-- .row -->
<div class="row halfpast-features-services">
<div class="container center">
<div class="col-1-fixed text-center">
<h1 class="tk-ltc-bodoni-175">HalfPast Features & Services</h1>
<h4 class="center">HalfPast partners with brands and retailers to help you find the relevant authorized retailer in your geography</h4>
</div><!-- .col-1-fixed .text-center -->
<div class="col-1-2-fixed">
<div class="row">
<div class="col-1-8">
<p><span class="icon-map-marker text-red"></span></p>
</div><!-- .col-1-8 -->
<div class="col-7-8">
<p><span class="text-red">Find local watch dealers in your area</span></p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi sodales rutrum mauris, a porta augue.</p>
</div><!-- .col-7-8 -->
<img src="http://staging.slackrmedia.com/halfpast/images/map.png" alt="Find local watch dealers in your area" class="img-border" />
</div><!-- .row -->
</div><!-- .col-1-2-fixed -->
<div class="col-1-2-fixed">
<div class="row">
<div class="col-1-8">
<p><span class="icon-info text-red"></span></p>
</div><!-- .col-1-8 -->
<div class="col-7-8">
<p><span class="text-red">Get exclusive content about brands</span></p>
<p>HalfPast partners with the leading brands in the luxury watch industry to provide exclusive branded content.</p>
</div><!-- .col-7-8 -->
<img src="http://staging.slackrmedia.com/halfpast/images/chrono-blue.png" alt="Get exclusive content about brands" class="img-border" />
</div><!-- .row -->
</div><!-- .col-1-2-fixed -->
</div><!-- .container .center -->
</div><!-- .row -->
<div class="row sign-up">
<div class="container center">
<div class="col-1-fixed text-center">
<h5 style="display: inline;">Sign up for a free HalfPast account — today</h5>
<a class="btn">Create your account</a>
</div><!-- .col-1-fixed -->
</div><!-- .container .center -->
</div><!-- .row -->
<footer class="row">
<div class="container center">
<div class="col-1-3-fixed footer-nav">
<p>Navigation</p>
<div class="row">
<div class="col-1-2">
<ul>
<li>
The Chronique
</li>
<li>
Reviews
</li>
<li>
Contact
</li>
</ul>
</div><!-- .col-1-2 -->
<div class="col-1-2">
<ul>
<li>
Boutiques
</li>
<li>
Features
</li>
<li>
Register/Login
</li>
</ul>
</div><!-- .col-1-2 -->
</div><!-- .row -->
</div><!-- .col-1-3-fixed -->
<div class="col-1-3-fixed"> </div>
<div class="col-1-3-fixed">
<p>Sign up for our newsletter</p>
<form action="">
<input type="email" placeholder="your email address" required /><span class="form_hint">Proper format "name#something.com"</span>
<input type="submit" value="SIGN UP" class="btn small" />
</form>
</div><!-- .col-1-3-fixed -->
<div class="col-1-fixed">
<img src="http://staging.slackrmedia.com/halfpast/images/logo-footer.png" class="img-center transition" />
</div><!-- .col-1-fixed -->
</div><!-- .container .center -->
</footer><!-- .row -->
CSS:
/* General
============================= */
html, html a {
padding-top: 20px;
text-shadow: 1px 1px 1px rgba(0,0,0,0.004);
font-smooth: always;
-webkit-font-smoothing: antialiased;
}
body { font: 1em/1.6 "myriad-pro", Arial, Helvetica, sans-serif; }
.left { float: left; }
.right { float: right; }
.center { margin: 0 auto; }
.img-center {
display: block;
margin: 0 auto;
}
.img-border { border: 5px solid #fff; }
/* Typography
============================= */
h1 { font-size: 2.2em; }
h2 { font-size: 2em; }
h3 { font-size: 1.8em; }
h4 { font-size: 1.6em; }
h5 { font-size: 1.4em; }
h6 { font-size: 12em; }
a {
color: #434343;
text-decoration: none;
}
a:hover { color: #000; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-red {
color: #c60202;
font-size: 1.313em;
}
/* Lists
============================= */
ul { list-style: none; }
ul li,
ol li { line-height: 2; }
ul.inline li,
ol.inline li { display: inline; }
ul.inline li:last-child,
ol.inline li:last-child { margin-right: 0px; }
input { -webkit-appearance: none; }
a:active, a:active *,
a:focus, a:focus *,
input:focus,
select:focus,
textarea:focus,
button:focus {
outline: none;
-moz-outline-style: none;
}
/* Effects
============================= */
.box-shadow {
-webkit-box-shadow: 0px 0px 3px 3px rgba(150, 150, 150, 0.3);
box-shadow: 0px 0px 3px 3px rgba(150, 150, 150, 0.3);
}
.border-radius {
-webkit-border-radius: 3px;
border-radius: 3px;
}
.transition,
a:hover {
-webkit-transition: all 0.2s linear;
-moz-transition: all 0.2s linear;
-ms-transition: all 0.2s linear;
-o-transition: all 0.2s linear;
transition: all 0.2s linear;
}
.background-cover {
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
/* Selection
============================= */
*::selection {
background: #d31d1c;
color: #fff;
}
*::-moz-selection {
background: #d31d1c;
color: #fff;
}
*::-webkit-selection {
background: #d31d1c;
color: #fff;
}
/* Container (w/Micro-Clearfix)
============================= */
.container { max-width: 1080px; }
.container:before,
.container:after {
content: " ";
display: table;
}
.container:after { clear: both; }
.container {
width: 80%;
*zoom: 1;
}
/* Grid
============================= */
[class*='col-'] {
float: none;
width: 100%;
}
*, *:after, *:before {
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.row { margin-left: -20px; }
.row:after {
clear: both;
content: "";
display: table;
}
/*
* Grid Gutters
*/
[class*='col-'] {
float: left;
padding-left: 20px;
}
.row-pad { padding: 20px 0 20px 20px; }
.row-pad [class*='col-']:last-of-type { padding-right: 20px; }
/*
* Fluid Grid Columns
*/
.col-1 { width: 100%; }
.col-7-8 { width: 75%; }
.col-2-3 { width: 66.66%; }
.col-1-2 { width: 50%; }
.col-1-3 { width: 33.33%; }
.col-1-4 { width: 25%; }
.col-1-8 { width: 12.5%; }
/*
* Fixed Grid Columns
*/
.col-1-fixed { width: 1080px; }
.col-7-8-fixed { width: 945px; }
.col-2-3-fixed { width: 720px; }
.col-1-2-fixed { width: 540px; }
.col-1-3-fixed { width: 360px; }
.col-1-4-fixed { width: 270px; }
.col-1-8-fixed { width: 135px; }
/* Header */
header img:hover { opacity: 0.6; }
header ul.inline li,
header nav ul.inline li { margin-right: 20px; }
header nav ul.inline li:last-of-type,
header ul.inline li:last-of-type { margin-right: 0px; }
header nav { margin-top: 90px; }
header.row .col-1-3-fixed:last-of-type nav { margin-top: 42px; }
header nav ul.inline li { margin-right: 80px; }
/* Masthead */
.masthead {
background: #000 url('../images/header.png') no-repeat center center;
color: #fff;
font-weight: 100;
min-height: 555px;
}
.masthead .container { margin-top: 90px; }
.masthead a { color: #c60202; }
.masthead a:hover { text-decoration: underline; }
.masthead h1,
.masthead h2 { font-weight: 100; }
.masthead h1 {
font-size: 2.625em;
margin-bottom: 5px;
}
.masthead h2 {
font-size: 2em;
margin-top: 10px;
}
.masthead form {
background: #fff;
margin-top: 60px;
padding: 20px;
width: 930px;
}
.masthead form input { height: 40px; }
.masthead form input[type="submit"].btn {
font-size: 1.25em;
line-height: 20px;
}
.masthead form ::-webkit-input-placeholder { color: #000; }
.masthead form :-moz-placeholder { color: #000; }
.masthead form ::-moz-placeholder { color: #000; }
.masthead form :-ms-input-placeholder { color: #000; }
/* Body */
.how-does-halfpast { margin-bottom: -65px; }
.how-does-halfpast .col-1-fixed img { padding-top: 40px; }
.halfpast-features-services {
background: #f4f4f4;
border-top: 1px solid #d9d9d9;
margin: 1px 0;
padding-top: 60px;
}
.halfpast-features-services h4 {
font-size: 1.313em;
font-weight: 100;
padding-bottom: 30px;
width: 600px;
}
.halfpast-features-services [class*='icon-'] {
font-size: 4em;
margin-left: 13px;
}
.halfpast-features-services img { margin: 0 0 -8px 20px; }
.halfpast-features-services img.img-border { border-bottom: 1px solid #fff; }
.sign-up {
border-top: 1px solid #d9d9d9;
padding: 100px 0;
}
.sign-up a.btn { margin: 0 0 -6px 30px; }
/* Footer */
footer {
background: #000;
color: #fff;
padding: 15px 0 30px;
}
footer a { color: #fff; }
footer a:hover { color: #ccc; }
footer ul { padding-left: 0px; }
footer ul li a { font-size: 0.875em; }
footer .col-1-3-fixed.footer-nav p { margin-bottom: 0px; }
footer form input { margin-right: 5px; }
footer .col-1-fixed { padding-top: 45px; }
footer .col-1-fixed img { opacity: 0.4; }
footer .col-1-fixed img:hover { opacity: 0.7; }
I would really appreciate any and all help on this. It's such a small, simple thing, but it's driving me absolutely crazy. Thanks anybody who helps me tackle this.
The .container div that holds your columns is set to 80% of the width of the page, so fixed width elements inside it will wrap when their parent container's computed width becomes too narrow. Max-width doesn't do anything if the computed width is smaller than 1080 - define the width of the .container as fixed, so that on smaller views you can just do a horizontal scroll.
Also, I personally browse at a browser width of 1280, so I would consider doing a little bit of refactoring to lessen whitespace, as in my view the top link bar also wraps around and breaks.