HTML content filling page, but able to scroll past to other content - html

I am trying to make it so that on the homepage of my site, when I load into the site, you can only see the nav, title, image and some text underneath, the red div elements should not be shown, and you would have to scroll down to see it. How do I do this while still making the page responsive?
h2 {
font-family: 'Raleway', sans-serif;
font-weight: 400;
}
h3 {
font-family: 'Raleway', sans-serif;
font-weight: 300;
}
p {
font-family: 'Raleway', sans-serif;
font-weight: 200;
}
body {}
img {
height: 10%;
width: 50%;
display: block;
margin-left: auto;
margin-right: auto;
}
ul {
list-style-type: none;
margin: 10px;
padding: 0px;
overflow: hidden;
}
li {
float: left;
padding: 1%;
font-family: 'Raleway', sans-serif;
}
li a {
text-decoration: none;
color: black;
}
li a.active {
text-decoration: underline;
}
.nav {
position: -webkit-sticky;
position: sticky;
top: 0;
background-color: white;
}
/*text that needs to stay on home page under image*/
.text {
text-align: center;
}
/*what needs to be hidden*/
.container1 {
padding: 40px;
background-color: red;
text-align: center;
}
/*Area with title and image*/
.header {
padding: 30px;
font-size: 40px;
text-align: center;
grid-area: banner;
width: 100%;
color: black;
}
#media screen and (max-width: 800px) {
.leftcolumn,
.rightcolumn {
width: 100%;
padding: 0;
}
}
<link href="https://fonts.googleapis.com/css?family=Raleway:200,400" rel="stylesheet">
<div class="nav">
<ul>
<li>Learning Journal</li>
<li>Tutorial</li>
<li>Contact Me</li>
</ul>
</div>
<div class="header">
<h2> CI435 - INTRODUCTION TO WEB DEVELEPMONT</h2>
<img src="images/htmlcode.jpg" alt="">
</div>
<div class="text">
<h2>PLACEHOLDER</h2>
</div>
<div class="container1">
<h3>Weeek x</h3>
<p> PLACEHOLDER</p>
</div>
<div class="container1">
<h3>Weeek x</h3>
<p> PLACEHOLDER</p>
</div>
<div class="container1">
<h3>Weeek x</h3>
<p> PLACEHOLDER</p>
</div>

You're looking for height: 100vh (the viewport unit).
You'll also need to wrap your .header and .text placeholder into a parent element so you can control the height. I've wrapped it into the <main class="full-height" element and styled the class .full-height { height: 100vh; }
Now the user is forced to scroll to the red no matter how big/small there device is.
h2 {
font-family: 'Raleway', sans-serif;
font-weight: 400;
}
h3 {
font-family: 'Raleway', sans-serif;
font-weight: 300;
}
p {
font-family: 'Raleway', sans-serif;
font-weight: 200;
}
body {}
img {
height: 10%;
width: 50%;
display: block;
margin-left: auto;
margin-right: auto;
}
ul {
list-style-type: none;
margin: 10px;
padding: 0px;
overflow: hidden;
}
li {
float: left;
padding: 1%;
font-family: 'Raleway', sans-serif;
}
li a {
text-decoration: none;
color: black;
}
li a.active {
text-decoration: underline;
}
.nav {
position: -webkit-sticky;
position: sticky;
top: 0;
background-color: white;
}
.text {
text-align: center;
}
.container1 {
padding: 40px;
background-color: brown;
text-align: center;
}
.header {
padding: 30px;
font-size: 40px;
text-align: center;
grid-area: banner;
width: 100%;
color: black;
}
.full-height { height: 100vh; }
#media screen and (max-width: 800px) {
.leftcolumn,
.rightcolumn {
width: 100%;
padding: 0;
}
}
<div class="nav">
<ul>
<li>Learning Journal</li>
<li>Tutorial</li>
<li>Contact Me</li>
</ul>
</div>
<main class="full-height">
<div class="header">
<h2> CI435 - INTRODUCTION TO WEB DEVELEPMONT</h2>
<img src="images/htmlcode.jpg" alt="">
</div>
<div class="text">
<h2>PLACEHOLDER</h2>
</div>
</main>
<div class="container1">
<h3>Weeek x</h3>
<p> PLACEHOLDER</p>
</div>
<div class="container1">
<h3>Weeek x</h3>
<p> PLACEHOLDER</p>
</div>
<div class="container1">
<h3>Weeek x</h3>
<p> PLACEHOLDER</p>
</div>

Related

How to make a centered menu with a logo image about 200px away from the screens edge

I need something like this, i tried alot but failed lol, im newenter image description here
flex space between
.row {
display: flex;
justify-content: space-between;
}
<div class="row">
<div class="left">logo</div>
<div class="center">menu menu menu menu</div>
<div class="right">anonymous</div>
</div>
You'll need some HTML and some CSS.
I don't have the time to make you the header just like in that screenshot you postet but maybe heres a start.
Put this in the body of your HTML page:
<div class="header">
CompanyLogo
<div class="header-right">
<a class="active" href="#home">Home</a>
Contact
About
</div>
</div>
<div style="padding-left:20px">
<h1>Responsive Header</h1>
<p>Resize the browser window to see the effect.</p>
<p>Some content..</p>
</div>
At the beginning of your document make a block or use an external stylesheet.
If you use an external stylesheet remember to link it in your HTML document.
In your style block put the following:
* {box-sizing: border-box;}
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
.header {
overflow: hidden;
background-color: #f1f1f1;
padding: 20px 10px;
}
.header a {
float: left;
color: black;
text-align: center;
padding: 12px;
text-decoration: none;
font-size: 18px;
line-height: 25px;
border-radius: 4px;
}
.header a.logo {
font-size: 25px;
font-weight: bold;
}
.header a:hover {
background-color: #ddd;
color: black;
}
.header a.active {
background-color: dodgerblue;
color: white;
}
.header-right {
float: right;
}
#media screen and (max-width: 500px) {
.header a {
float: none;
display: block;
text-align: left;
}
.header-right {
float: none;
}
}
You'll end up with a fairly responsive header.
Now just link in your logo.
This is an example from w3Schools.
Check out this snippet.
* {box-sizing: border-box;}
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
}
.header {
overflow: hidden;
background-color: #f1f1f1;
padding: 20px 10px;
}
.header a {
float: left;
color: black;
text-align: center;
padding: 12px;
text-decoration: none;
font-size: 18px;
line-height: 25px;
border-radius: 4px;
}
.header a.logo {
font-size: 25px;
font-weight: bold;
}
.header a:hover {
background-color: #ddd;
color: black;
}
.header a.active {
background-color: dodgerblue;
color: white;
}
.header-right {
float: right;
}
#media screen and (max-width: 500px) {
.header a {
float: none;
display: block;
text-align: left;
}
.header-right {
float: none;
}
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<div class="header">
CompanyLogo
<div class="header-right">
<a class="active" href="#home">Home</a>
Contact
About
</div>
</div>
<div style="padding-left:20px">
<h1>Responsive Header</h1>
<p>Resize the browser window to see the effect.</p>
<p>Some content..</p>
</div>
</body>
</html>

Cannot scroll to rest of the content (CSS)

I have a header in the beginning of my webpage with a background image covering 100% of the width and 100vh. I want to add a different section in my page for the story section which is one of my nav
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html,body {
font-family: 'Lato','sans-serif','arial';
color: #fff;
font-size: 15px;
font-weight: 300;
text-transform: uppercase;
text-rendering: optimizeLegibility;
}
.wrapper {
width: 100%;
height: 100vh;
padding: 0;
}
.flex {
display: flex;
justify-content: space-between;
background-image: linear-gradient(rgba(0,0,0,0.6),rgba(0,0,0,0.6)),url("img/truck.jpg");
background-size: cover;
background-position: center;
height: 100vh;
}
.flex-item {
padding-top: 15px;
}
.item1 {
padding-top: 0;
padding-left: 30px;
}
.logo {
height: 90px;
}
.main-nav ul {
display: flex;
margin: 0;
padding: 0;
list-style: none;
}
.main-nav a {
color: white;
padding: 1rem;
text-decoration: none;
}
.main-nav a:hover {
color:orange;
}
.hero {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.hero a {
text-decoration: none;
color: white;
display: block;
margin: 10px;
}
.btn {
background-color: orange;
border-radius: 50px;
}
/*---------------------------------*/
/*Story Section*/
/*---------------------------------*/
section .flex2 {
display: flex;
flex-direction: column;
color: black;
height: 100vh;
}
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" href="Resources/css/styles.css">
</head>
<body class="wrapper">
<header class="flex">
<div class="flex-item item1">
<img src="Resources/img/moBurgerzLogo.png" class="logo">
</div>
<nav class="flex-item main-nav">
<ul>
<li>Our Story</li>
<li>Locations</li>
<li>Menu</li>
<li>Order now</li>
</ul>
</nav>
<div class="hero">
<h2>Best Burgers <br> In DA City(D.C)</h2>
<a href="#" class="btn" btn-full>Order now!</a>
<a href="#" class="btn" btn-ghost>View Menu!</a>
</div>
</header>
<section class="flex-2">
<div class="flex-item-2">
<h2>Established in 2017 in D.M.V</h2>
<p class="story"> founded in 2017 by owner Med.<br> Since then we have been serving the best hand crafted burgers in the D.M.V.<br>All our meat is halal and all of our ingridients are organic.</p>
</div>
</section>
</body>
</html>
elements. However I can not scroll to view the content in the story section consisting of an h2 element and paragraph tag inside a flex container.
html,
body {
font-family: "Lato", "sans-serif", "arial";
color: #fff;
font-size: 15px;
font-weight: 300;
text-transform: uppercase;
text-rendering: optimizeLegibility;
}
I think because your font color is white

CSS Grid - Align-self just above the center

I have the following HTML code
<header>
<nav>
<ul>
<li>Childhood</li>
<li>Early years</li>
<li>End</li>
<li>About this</li>
</ul>
</nav>
<div id="header-content">
<div id="info-title">
<h1 id="title">Henry Charles Bukowski Jr.</h1>
<h2>"Find what you love and let it kill you."</h2>
</div>
<figure>
<img src="images/charles-img1-2x.png" alt="Charles Bukowski's picture">
</figure>
</div>
<div id="tribute-info">
<p>8/16/1920</p>
<p>3/09/1994</p>
</div>
<span class="next">next section</span>
</header>
Which presents this page with the CSS:
https://prnt.sc/qx4qim
CSS:
/* Montserrat font import */
#import url('https://fonts.googleapis.com/css?family=Montserrat:100,300,400,600,700&display=swap');
* {
margin: 0;
padding: 0;
}
body {
background-color: #2F2E2E;
}
#main {
font-family: 'Montserrat', sans-serif;
color: #E0E1DD;
}
header,
section {
padding: 40px 60px;
height: calc(100vh - 80px);
}
#childhood,
#end {
background: #31303B;
}
ul {
list-style: none;
}
/* text style */
h1 {
font-weight: bold;
font-size: 80px;
}
h2 {
font-weight: 100;
font-size: 60px;
}
h3 {
font-weight: 600;
font-size: 60px
}
h4 {
font-weight: 600;
font-size: 50px;
}
p {
font-weight: 400;
font-size: 45px;
}
/* text style end */
/* nav link */
nav ul {
display: flex;
justify-content: space-between;
font-weight: 300;
font-size: 50px;
}
nav ul li a {
text-decoration: none;
color: #E0E1DD;
transition: .3s color;
}
nav ul li a:hover {
color: rgb(138, 128, 128);
}
/* nav links end */
#header-content {
display: flex;
}
#info-title{
align-self: center;
}
header figure img {
height: auto;
max-height: 850px;
max-width: 630px;
}
I align the texts on the page with the align-self: center property; but if I want to upload these texts a bit to look like this: https://prnt.sc/qx4qol
Is there a property that allows me to enter numeric values for vertical alignment?
The top property does not work since the display is set to flex
I think if you move:
<div id="tribute-info">
<p>8/16/1920</p>
<p>3/09/1994</p>
</div>
into the header-content element then modify the css to this, should do the trick:
.header { position: relative; }
.tribute-info { position: absolute; bottom: 15px; left: 15px; }
add display: flex; and flex-direction: column; to header
add margin: auto 0; to #header-content
/* Montserrat font import */
#import url('https://fonts.googleapis.com/css?family=Montserrat:100,300,400,600,700&display=swap');
* {
margin: 0;
padding: 0;
}
body {
background-color: #2F2E2E;
}
#main {
font-family: 'Montserrat', sans-serif;
color: #E0E1DD;
}
header,
section {
padding: 40px 60px;
height: calc(100vh - 80px);
}
#childhood,
#end {
background: #31303B;
}
ul {
list-style: none;
}
/* text style */
h1 {
font-weight: bold;
font-size: 80px;
}
h2 {
font-weight: 100;
font-size: 60px;
}
h3 {
font-weight: 600;
font-size: 60px
}
h4 {
font-weight: 600;
font-size: 50px;
}
p {
font-weight: 400;
font-size: 45px;
}
/* text style end */
/* nav link */
nav ul {
display: flex;
justify-content: space-between;
font-weight: 300;
font-size: 50px;
}
nav ul li a {
text-decoration: none;
color: #E0E1DD;
transition: .3s color;
}
nav ul li a:hover {
color: rgb(138, 128, 128);
}
/* nav links end */
#header-content {
display: flex;
margin: auto 0; /*add this*/
}
#info-title{
align-self: center;
}
header figure img {
height: auto;
max-height: 850px;
max-width: 630px;
}
/* add flex*/
header {
display: flex;
flex-direction: column;
}
<header>
<nav>
<ul>
<li>Childhood</li>
<li>Early years</li>
<li>End</li>
<li>About this</li>
</ul>
</nav>
<div id="header-content">
<div id="info-title">
<h1 id="title">Henry Charles Bukowski Jr.</h1>
<h2>"Find what you love and let it kill you."</h2>
</div>
<figure>
<img src="images/charles-img1-2x.png" alt="Charles Bukowski's picture">
</figure>
</div>
<div id="tribute-info">
<p>8/16/1920</p>
<p>3/09/1994</p>
</div>
<span class="next">next section</span>
</header>

How do I float a header nav tag to the right?

Question
I've looked over the code very carefully and can't see a reason at all whatsoever why the header nav float isn't working in the stylesheet. I'm including all the html code and css code down below. I want to move my
header nav to the right in my css code so that my links appear on the top right corner of my home page horizontally.
body {
font: 15px/1.5 Arial, Helvetica, sans-serif;
padding: 0;
margin: 0;
background-color: #f4f4f4;
}
/*Global*/
.container {
width: 80%;
margin: auto;
overflow: hidden;
}
ul {
margin: 0;
padding: 0;
}
/* header */
header {
background: #35424a;
color: #fff;
padding-top: 30px;
min-height: 70px;
border-bottom: #000 3px solid;
}
header a {
color: #fff;
text-decoration: none;
text-transform: uppercase;
font-size: 16px;
}
header li {
float: left;
display: inline;
padding: 0 20px 0 20px;
}
header #branding {
float: left;
}
header #branding h1 {
margin: 0;
}
header nav {
float: right;
margin-top: 10px;
}
header .highlight, header .current a {
color: #e8491d;
font-weight: bold;
}
header a:hover {
color: #ccc;
font-weight: bold;
}
/* Home Section */
#home {
min-height: 400px;
background: url("http://www.ridgedesign.ie/wp-content/uploads/2011/02/Ridge-Design-Website-Design-Background.jpg") 0 400px;
background-size: cover;
text-align: center;
color: #fff;
}
#home h1 {
margin-top: 100px;
font-size: 55px;
margin-bottom: 10px;
}
#home p {
font-size: 20px;
<!DOCTYPE>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Home</title>
<body>
<header>
<div class="container">
<div id="branding"><span class="highlight"><h1>James
Velardi</span></h1>
<nav>
<ul>
<li class="current">Home</li>
<li>About</li>
<li>Services</li>
</ul>
</nav>
</div>
</div>
</header>
<section id="home">
<div class="container">
<h1>Affordable Professional Web Design</h1>
<p>laskfj;jla;jal;j;aljs;lasj;lasjl;ajsdlajsdl;fajsldfkjals;dfjalsdkfjalsf</p>
</div>
</section>
You have two problems that become quite obvious if you look at the page in the browser inspector:
The first is that you have floated the branding div, and floating an element removes it from the regular flow and it isn't full width anymore, so the navigation that is inside is put below the heading.
You have mixed the opening and closing tags of <h1> and <span class="highlight"> and this caused that the block <h1> is being inside of the inline <span>, at least in Firefox.
Compare this screenshot of your example in the Firefox inspector:
With this other one of the adjusted code:
Remember, browser inspector is your friend.
body {
font: 15px/1.5 Arial, Helvetica, sans-serif;
padding: 0;
margin: 0;
background-color: #f4f4f4;
}
/*Global*/
.container {
width: 80%;
margin: auto;
overflow: hidden;
}
ul {
margin: 0;
padding: 0;
}
/* header */
header {
background: #35424a;
color: #fff;
padding-top: 30px;
min-height: 70px;
border-bottom: #000 3px solid;
}
header a {
color: #fff;
text-decoration: none;
text-transform: uppercase;
font-size: 16px;
}
header li {
float: left;
display: inline;
padding: 0 20px 0 20px;
}
header #branding {
/*float: left;*/
}
header #branding h1 {
margin: 0;
}
header nav {
float: right;
margin-top: 10px;
}
header .highlight, header .current a {
color: #e8491d;
font-weight: bold;
}
header a:hover {
color: #ccc;
font-weight: bold;
}
/* Home Section */
#home {
min-height: 400px;
background: url("http://www.ridgedesign.ie/wp-content/uploads/2011/02/Ridge-Design-Website-Design-Background.jpg") 0 400px;
background-size: cover;
text-align: center;
color: #fff;
}
#home h1 {
margin-top: 100px;
font-size: 55px;
margin-bottom: 10px;
}
#home p {
font-size: 20px;
<!DOCTYPE>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Home</title>
<body>
<header>
<div class="container">
<div id="branding"><h1><span class="highlight">James
Velardi</span></h1>
<nav>
<ul>
<li class="current">Home</li>
<li>About</li>
<li>Services</li>
</ul>
</nav>
</div>
</div>
</header>
<section id="home">
<div class="container">
<h1>Affordable Professional Web Design</h1>
<p>laskfj;jla;jal;j;aljs;lasj;lasjl;ajsdlajsdl;fajsldfkjals;dfjalsdkfjalsf</p>
</div>
</section>
I added class="nav" to the navigation unordered list and set position to absolute using a .nav selector.
.nav {
position:absolute;
top: 20px;
right:0px;
}
You can change the position by adjusting top and right values.
body {
font: 15px/1.5 Arial, Helvetica, sans-serif;
padding: 0;
margin: 0;
background-color: #f4f4f4;
}
/*Global*/
.container {
width: 80%;
margin: auto;
overflow: hidden;
}
ul {
margin: 0;
padding: 0;
}
/* header */
header {
background: #35424a;
color: #fff;
padding-top: 30px;
min-height: 70px;
border-bottom: #000 3px solid;
}
header a {
color: #fff;
text-decoration: none;
text-transform: uppercase;
font-size: 16px;
}
.nav {
position:absolute;
top: 20px;
right:0px;
}
header li {
float: left;
display: inline;
padding: 0 20px 0 20px;
}
header #branding {
float: left;
}
header #branding h1 {
margin: 0;
}
header nav {
float: right;
margin-top: 10px;
}
header .highlight, header .current a {
color: #e8491d;
font-weight: bold;
}
header a:hover {
color: #ccc;
font-weight: bold;
}
/* Home Section */
#home {
min-height: 400px;
background: url("http://www.ridgedesign.ie/wp-content/uploads/2011/02/Ridge-Design-Website-Design-Background.jpg") 0 400px;
background-size: cover;
text-align: center;
color: #fff;
}
#home h1 {
margin-top: 100px;
font-size: 55px;
margin-bottom: 10px;
}
#home p {
font-size: 20px;
}
<header>
<div class="container">
<div id="branding"><span class="highlight"><h1>James
Velardi</h1></span>
<nav>
<ul class="nav">
<li class="current">Home</li>
<li>About</li>
<li>Services</li>
</ul>
</nav>
</div>
</div>
</header>
<section id="home">
<div class="container">
<h1>Affordable Professional Web Design</h1>
<p>laskfj;jla;jal;j;aljs;lasj;lasjl;ajsdlajsdl;fajsldfkjals;dfjalsdkfjalsf</p>
</div>
</section>
I think your #branding div being floated left is breaking it--and doesn't seem necessary since you want that left aligned anyway.
It works for me with:
#branding {
float: none
}
Also - in your html you need to move your floated .nav div before the .highlight span

white space to the right of my html/css webpage

I am having a hard time understanding why there is a small white space next to my webpage. I have checked inspect element and it says the body stops before the white space begins (as in the border of my body is where is want it to be). I am a beginner at writing HTML and CSS so hopefully this will be an easy problem to fix!
HTML:
<!DOCTYPE html>
<html>
<body>
<!--Logo + Social media and login + navbar + search bar-->
<div class="login">
<div class="container-fluid">
<ul class="pull-right">
<li class="loginbutton">Log In</li>
<li>Sign Up</li>
<li></li>
</ul>
<ul class="pull-left">
<li><img class="twitter" src="#"></li>
<li><img class="facebook" src="#"></li>
<li class="pressreleases">Press</li>
</ul>
</div>
</div>
<div class="logo">
<div class="container-fluid">
<img class="logo" src="#" border="0">
</div>
</div>
<div class="nav">
<ul class="navbar">
<li>New</li>
<li>Popular</li>
<li>Database</li>
<li>News</li>
</ul>
</div>
<div class="searchbar">
<div class="container-fluid">
<div class="col-md-12">
<form>
<input class="search" type="text" placeholder="Lookup symbol..." required>
<input name="Submit" class="button" type="submit" value="Search">
</form>
</div>
</div>
</div>
<!-- end Logo + Social media and login + navbar + search bar-->
<div class="frontpage">
<div class="container-fluid">
<div class="row">
<div class="col-md-9">
<div class="headliner">
<h3>New releases</h3>
<p>Learn everything you need to know. <p>
<p>Learn more</p>
</div>
</div>
<div class="col-md-3">
<div class="ad1">
<h1>Ad</h1>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="row">
<ul class="top">
<li>About Us</li>
<li>Contact Us</li>
<li>Sitemap</li>
</ul>
</div>
<div class="row">
<ul class="middle1">
<li>Advertise</li>
<li>Investor Relations</li>
</ul>
</div>
<div class="row">
<ul class="middle2">
<li>Application for Internship/Position</li>
</ul>
</div>
<div class="row">
<ul class="bottom">
<li>Privacy Policy</li>
<li>Terms of use</li>
<li>Feedback</li>
</ul>
</div>
<div class="copyright">
<p>2014<p>
</div>
</footer>
</body>
</html>
CSS:
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Logo + navbar
+ login/social media + search bar v
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
.logo {
max-width: 280px;
margin-right: auto;
margin-left: auto;
}
.logo img {
width: 150%;
}
.logo .container-fluid {
height:135px;
background-color: #ffffff;
width: 100%;
padding-top:5px;
}
.nav .navbar {
background-color: #40517f;
list-style-type: none;
margin: 5;
padding: 5;
overflow: hidden;
position:relative; bottom:50px;
}
.nav .navbar li {
float: left;
border-style: solid;
border-width: 1px;
border-color: #40517f;
}
.nav .navbar li a{
display: block;
width: 300px;
font-weight: none;
color: #40517f;
background-color: #B4C8E8;
text-align: center;
padding: 14px;
text-decoration: none;
font-family: 'Cabin', sans-serif;
}
.nav .navbar li a:hover {
color: #666666;
background-color: #CAD8EF;
FONT-WEIGHT:none;
font-family: 'Cabin', sans-serif;
}
.login .container-fluid {
background-color: #ffffff;
padding-top:5px;
z-index: 1;
height: 30px;
}
.login .pull-right li {
float: right;
list-style: none;
overflow: hidden;
}
.login .pull-right li a {
display: inline;
padding: 10px;
color: #40517f;
font-size: 14px;
font-family: 'Cabin', sans-serif;
}
.login .pull-right li a:hover {
color: #B4C8E8;
margin-top: 0px;
margin-bottom: 0px;
font-family: 'Cabin', sans-serif;
}
.login .pull-left li {
float: left;
list-style: none;
color: #666666;
font-size: 14px;
position: relative;
right: 50px;
overflow: hidden;
}
.login .pull-left li a {
display: inline;
padding: 10px;
opacity: .8;
font-family: 'Cabin', sans-serif;
}
.login .pull-left .facebook {
width: auto;
height: 20px;
vertical-align: sub;
}
.login .pull-left .twitter {
width: 20px;
height: auto;
vertical-align: sub;
}
.login .pull-left .pressreleases {
right: 3 px;
vertical-align: sub;
font-family: 'Cabin', sans-serif;
}
.searchbar {
background-color:#D1D1D1;
text-align:center;
position:relative;bottom:75px;
border-style: solid;
border-width: 2px;
border-color: #40517f;
}
.search {
width: 250px;
padding:8px 15px;
background-color:#FFFFFF;
border:3px solid #D1D1D1;
color: #666666;
font-family: 'Cabin', sans-serif;
}
.button {
position:relative;
padding:6px 15px;
left:-2px;
background-color:#40517f;
color:#ffffff;
opacity: .6;
font-family: 'Cabin', sans-serif;
}
.button:hover {
background-color:#B4C8E8;
border-color: #B4C8E8;
color:#ffffff;
opacity: 1;
font-family: 'Cabin', sans-serif;
}
/* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Logo + navbar + ^
login/social media + search bar
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Frontpage v
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
.frontpage {
position:relative; bottom:50px;
}
/*
Height and width for all of "frontpage" are just placeholders!
Make sure to get right of them when content is added.
*/
.frontpage .container-fluid .headliner {
background-color: #efefef;
height: 400px;
}
.frontpage .container-fluid .ad1 {
background-color: #efefef;
height: 400px;
}
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Frontpage ^
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Footer v
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
footer {
background-color: #666666;
text-align:center;
}
footer .top {
list-style: none;
color: #478bca;
font-family: 'Cabin', sans-serif;
font-size: 18px;
padding-top:15px;
}
footer .top li {
display: inline;
}
footer .top li:before {
content: " | ";
}
footer .top li:first-child:before {
content: none;
}
footer .middle1 {
list-style: none;
color: #478bca;
font-family: 'Cabin', sans-serif;
font-size: 18px;
}
footer .middle1 li {
display: inline;
}
footer .middle1 li:before {
content: " | ";
}
footer .middle1 li:first-child:before {
content: none;
}
footer .middle2 {
list-style: none;
color: #478bca;
font-family: 'Cabin', sans-serif;
font-size: 18px;
}
footer .middle2 li {
display: inline;
}
footer .middle2 li:before {
content: " | ";
}
footer .middle2 li:first-child:before {
content: none;
}
footer .bottom {
list-style: none;
color: #478bca;
font-family: 'Cabin', sans-serif;
font-size: 18px;
}
footer .bottom li {
display: inline;
}
footer .bottom li:before {
content: " | ";
}
footer .bottom li:first-child:before {
content: none;
}
footer .copyright {
background-color: #666666;
height: 60px;
}
footer .copyright p {
color: #D1D1D1;
padding-top: 10px;
font-size: 12px;
}
/*!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Footer ^
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
You can try adding
body {
margin:0;
}
Add this code at top of css:
html, body {
margin: 0;
padding: 0;
}
see the result:
http://jsfiddle.net/zpq3uxuq/
Enjoy your code!
The div class="row"s in the footer need to have a div class="container" around them.
If you are referring to the white space between the div.frontpage and footer, then check my answer below:
.frontpage {
position: relative;
bottom: 50px;
}
Remove the bottom:50px to resolve the issue.
bottom explanation
UPDATE
In light of the comment from the OP, I've updated my answer:
The issue is related to the negative margin set by the following CSS declaration:
.row {
margin-right: -15px;
margin-left: -15px;
}
Remove the negative margin to resolve the issue.