How to remove blank white space below footer? - html

I tried to eliminate the white space according to the answered questions that I found. But not of them is working on my side.
I tried to remove the padding in div's footer, but still the white space still there.
How to fix this?
CSS:
footer #bottom-footer{ background: url(/files/bg-testimonials.jpg) no-repeat; background-repeat: no-repeat; background-size: cover; box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, 0.52); color: #000; text-align: left; padding: 50px 0 50px 0; font-size: 0.8125em; font-family: 'Open Sans', sans-serif; font-weight: 600; letter-spacing: normal; position: relative; left: 0; bottom: 0; height: auto; width: 100%; }
.footer-wrap a{ color: #000; }
.footer-wrap a:hover{ color: #d31716; }
.footer-logo a{ margin-bottom: 6px; display: block; }
.footer-socials{ float: none; line-height: 0; text-align: center; padding: 1em 0 2em;}
.footer-socials a{ border-radius: 100%; border: 3px solid #FFF; color: #FFF; display: inline-block; font-size: 1.25em; line-height: 2.50em; margin-left: 0.1em; text-align: center; vertical-align: middle; width: 2.50em; height: 2.50em; }
.footer-socials .social-icons span{ cursor: pointer; display: inline-block; }
.footer-socials .socials i{ -webkit-backface-visibility: hidden; -moz-backface-visibility: hidden; backface-visibility: hidden; }
.tagcloud a{ font-size: 13px !important; background: rgba(0,0,0,0.4); padding: 8px 10px; margin: 0 2px 4px 0; display: inline-block; line-height: 1; }
.sidebar .tagcloud a{ background: #23A38F; color: #FFF; }
.bottom-menu{ float: right; margin: 1em 4em 0 0; }
.bottom-menu ul{ list-style-type: none; font-size: 1.1125em; }
.bottom-menu ul li{ display: inline-block; font-family: 'Open Sans', sans-serif; font-weight: normal; line-height: 1.8; border-radius: 5px; border: 1px solid #CCC; box-shadow: 0 0 2px rgba(0,0,0,0.3); padding: 1em; margin: 0 0.10em 0 0; background: #FFF; color: #3e3e3e; }
.footerimg{ width:6em; }
.copyright{ margin: 2em 0 0 4em; }
.copyrighttext{ font-size: 1.08em; font-weight: 600; color: #B3B3B3; margin: 0 0 0 0.50em; }
#imgv ul{ list-style-type: none; letter-spacing: 1px; margin-top: -20px; font-size: 0.75em; }
#imgv ul li{ display: inline; }
.social-footer-mobile{ display: none; }
.footer-vertical-line{ border-top: 1px solid #8c8b8b;width: 9em; vertical-align: middle; position: relative; }
.left{ left: 32.50em; top: 1.65em; }
.right{ right: 32.50em; top: -1.45em; float: right; }
HTML:
<div id="bottom-footer" class="footer-menu">
<div class="ak-container">
<div class="footer-wrap clearfix">
<div class="footer-socials clearfix">
<div class="footer-vertical-line left"></div>
<div class="socials">
<span class="font-icon-social-facebook"></span>
<span class="font-icon-social-twitter"></span>
<span class="font-icon-social-youtube"></span>
<span class="font-icon-social-linkedin"></span>
</div>
<div class="footer-vertical-line right"></div>
</div>
<div class="footer-columns-4">
<ul>
<li>Products</li>
<li>All products</li>
<li>Standard loan</li>
<li>Promo loans</li>
<li>Insurance for loans</li>
</ul>
<ul>
<li>About Loans</li>
<li>How to apply</li>
<li>Our partner stores</li>
<li>Terms & Conditions</li>
<li>Safety guarantee</li>
</ul>
<ul>
<li>For Customers</li>
<li>Financial literacy</li>
<li>Payments & Guidelines</li>
<li>Menu</li>
<li>FAQ</li>
</ul>
<ul>
<li>Title</li>
<li>About us</li>
<li>News</li>
<li>Careers</li>
<li>Contacts</li>
</ul>
</div>
<nav role="navigation">
<div class="bottom-menu">
<ul class="footer-desktop-version">
<li><span class="footer-icon-cs icon-icon-support"></span>Customer Service: <strong>11111111</strong></li>
<li><span class="footer-icon-cs icon-icon-collection"></span>Collections <strong>1111111</strong></li>
</ul>
</div>
</nav>
<div class="copyright">
<img src="/files/footer.jpg" class="footerimg"><span class="copyrighttext"> All Rights Reserved ® 2017
Company Name</span>
</div><!-- .copyright -->
</div><!-- .footer-wrap -->
</div>
</div>

Your code shows nothing, perhaps you can't reveal your web address no problem.
You need to check something in your html any div or content area have minus value like top:-100px if you set something like this you need to change like margin-top:-100px

first you have to right click on the footer and click inspect
then you will see all the css applied to that particular element, select the parent element
check if bottom padding is applied to body or footer element
if you dont find bottom padding for footer or body element or other parent class of footer specify bottom padding in negative. (eg -5px)
note: you dont need to modify the css directly for testing purpose you can change and check the effect in debugging tool itself (f12 shortcut for debugging tool)
it should be something like:
(element name) { padding-bottom:-30px); }
also check for bottom margin if padding does not work.

Related

How to move a specific element?

An element won't move to my intended position. I want to have some white space between the right of "Register" and the browser but don't know how to do it. I have tried padding but it seem to be kind of wrong thinking.
* {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body {
font-family: sans-serif;
color: black;
}
.firstpart {
background-color: #eee;
height: 30vh;
}
.navbar li {
list-style: none;
display: inline;
}
.navbar-left {
float: left;
padding: 20px 20px 0 20px;
}
.navbar-right {
float: right;
padding: 20px 20px 0px 20px;
}
.badge {
background-color: black;
color: white;
height: 35px;
width: 80px;
}
<div class="firstpart">
<div class="navbar">
<ul>
<li class="navbar-left">ABOUT</li>
<li class="navbar-left">CONTACT</li>
<li class="navbar-left">FAQS</li>
<div class="navbar-right badge">
<li>REGISTER</li>
</div>
<li class="navbar-right">SIGN IN</li>
<li class="navbar-right">MANAGE BOOKING</li>
</ul>
</div>
</div>
You just need to add:
.navbar {
padding-right: 10px;
}
You can also remove the div inside of your unordered list as this isn't valid HTML. Replace it with:
<li class="navbar-right badge">REGISTER</li>
Code (open in "Full page" view as otherwise "Manage Booking" gets wrapped):
/* Add this */
.navbar {
padding-right: 10px;
}
* {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
}
body{
font-family: sans-serif;
color: black;
}
.firstpart{
background-color:#eee;
height: 30vh;
}
.navbar li{
list-style: none;
display: inline;
}
.navbar-left{
float: left;
padding: 20px 20px 0 20px;
}
.navbar-right{
float: right;
padding: 20px 20px 0px 20px;
}
.badge{
background-color: black;
color:white;
height: 35px;
width: 80px;
}
<body>
<div class="firstpart">
<div class="navbar">
<ul>
<li class="navbar-left">ABOUT</li>
<li class="navbar-left">CONTACT</li>
<li class="navbar-left">FAQS</li>
<li class="navbar-right badge">REGISTER</li> <!-- Use an li element instead -->
<li class="navbar-right">SIGN IN</li>
<li class="navbar-right">MANAGE BOOKING</li>
</ul>
</div>
</div>
</body>
I think you could simply set a width for .navbar div to say, 98%
.navbar {
width:98%;
}

Unordered List Help! Need a solution to this

How can I remove the bullet and extra space before li.
I have tried list-style: none, but this just removed the bullet and the extra space still remains. Here is the jsFiddle.
I would like something like this.
.
The ul tag takes default padding which given by the browser so you have to remove it. By adding padding:0px.
/* --------------------------------------
Pricing & Plans
-------------------------------------- */
.pricing-title {
color: #272727;
text-align: center;
padding: 15px;
font-family: 'myriadbold';
border-bottom: 2px solid #ededed;
}
.pricing-price {
color: #4f4f4f;
text-align: center;
font-size: 80px;
margin-bottom: 20px;
}
.pricing-yr {
font-size: 20px;
font-family: 'myriadsemibold';
}
.price-bg ul {
list-style-type: none;
position: relative;
left: 0px;
border-top: 1px solid #eaeaea;
padding:0px;
}
.price-bg ul li {
position: relative;
padding: 16px 5px 16px 70px;
border-bottom: 1px solid #eaeaea;
}
.price-bg ul li:before {
font-family: "fontawesome";
content: "\f00d";
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
position: absolute;
top: 50%;
left: 0;
width: 52px;
font-size: 12px;
color: #ef662f;
text-align: center;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
}
.price-bg ul li.tick:before {
font-family: "fontawesome";
content: '\f00c';
color: #7ab55c;
}
.price-bg ul li:after {
content: '';
display: block;
position: absolute;
top: 0;
left: 52px;
bottom: 0;
width: 1px;
background: #eaeaea;
}
.price-bg {
background-color: white;
border-radius: 7px;
width: 100%;
border: 1px solid #eaeaea;
-webkit-box-shadow: 0px 2px 4px 0px rgba(148,148,148,0.4);
-moz-box-shadow: 0px 2px 4px 0px rgba(148,148,148,0.4);
box-shadow: 0px 2px 4px 0px rgba(148,148,148,0.4);
}
<section class="container">
<h3>SUBHEADING</h3>
<h1>Simple Pricing for All</h1>
<div class="row">
<div class="col-sm-4">
<div class="price-bg">
<h3 class="pricing-title">BASIC PACKAGE</h3>
<h1 class="pricing-price">£150<span class="pricing-yr">yr</span></h1>
<ul>
<li class="tick">3x iBeacons<span>+ £30 for additional iBeacon</span></li>
</ul>
<p>APP FEATURES</p>
<ul>
<li class="tick">Smart Quiz</li>
<li>Educational Tasks</li>
<li>Interactive Gallery Game</li>
<li>Brand Customisation</li>
<li>Removed Watermark</li>
</ul>
<p>PACKAGE SUPPORT</p>
<ul>
<li>All Future Features/Content<span>+ exclusive content</span</li>
<li class="tick">Unlimited, free 24 hour support</li>
<li class="tick">Unlimited Users</li>
<li class="tick">Free Maintenance</li>
<li class="tick">No setup fees</li>
</ul>
<p>EXTRA ADD-ONS (OPTIONAL)</p>
<ul>
<li>Step by Step Videos</li>
<li>Content Request<span>(Our team will update the apps
content for you)</span></li>
<li>Workshop<span>+ step by step videos</span></li>
</ul>
</div>
</div>
<div class="col-sm-4">
<div class="price-bg">
</div>
</div>
<div class="col-sm-4">
<div class="price-bg">
</div>
</div>
</div>
</section>
just add padding-left 0
for (.price-bg ul)
add padding-left: 0px; to the .price-bg ul
It's because of the default margin and padding on list items.
Reset the margin and padding to 0 on .price-bg ul. Here is an updated fiddle
.price-bg ul {
list-style: none;
position: relative;
left: 0px;
margin: 0;
padding: 0;
border-top: 1px solid #eaeaea;
}
Adding to the other answers, if you are using bootstrap, you can add class:
class="list-unstyled"
To your UL.

When I refresh browser then the NAVIGATION bar change the place. Why?

When I refresh browser then the NAVIGATION bar changes place.
Why is this happening? Where is the error?
I cannot detect the problem. I think, I have written many extra CSS style. Is it? Please help to fix this.
HTML
<body>
<header>
<div class="con_header">
<h1> SITE NAME</h1>
<nav>
<ul>
<li class="chosen">HOME</li>
<li>ABOUT</li>
<li>SERVICES</li>
<li>PORTFOLIO</li>
<li>CONTACTS</li>
</ul>
</nav>
</div>
</header>
</body>
CSS:
header {
background-color: #202628;
height: 80px;
color: #e7e7e7;
font-family: 'Roboto Condensed', sans-serif;
}
.con_header{
width:1170px;
margin: 0 auto;
}
.con_header h1{
float: left;
}
.con_header nav{
float: right;
}
.con_header::after{
content:'';
display:block;
clear: both;
}
.con_header ul{
margin-top:26px;
}
.con_header li{
display: inline;
}
.con_header li a{
color: #e7e7e7;
text-align: center;
text-decoration: none;
padding: 33px 10px 33px 10px;
margin: -4px;
}
.con_header li a:hover{
color: #e7e7e7;
background-color: #e84c3d;
text-align: center;
text-decoration: none;
padding: 33px 10px 33px 10px;
margin: -4px;
}
.chosen{
color: #e7e7e7;
background-color: #e84c3d;
text-align: center;
text-decoration: none;
padding: 33px 15px 33px 15px;
margin: -4px;
}
Fiddle: http://jsfiddle.net/jo45sdob/
try commenting out the space between the li tags like this:
<ul>
<li class="chosen">HOME</li><!--
--><li>ABOUT</li><!--
--><li>SERVICES</li><!--
--><li>PORTFOLIO</li><!--
--><li>CONTACTS</li>
</ul>
thats if I understood what the problem was..

CSS and HTML navbar list with image

I am semi-new to web development and am currently working on a webpage with a fixed top navbar. I have my logo in the center of a list and my links outside it. I would like the links to be vertically centered. I will include a screenshot and the code. Maybe you can help me? Thanks a lot! I appreciate your time.
Screenshot of Navbar
HTML:
<div class="header">
<div class="table">
<div class="navbar">
<ul>
<li>Home</li>
<li>About</li>
<li>Before & After</li>
<li><img src="photos/logo.png"> </li>
<li>Portfolio</li>
<li>Facebook</li>
<li> <script src="js/email.js"></script>
</ul>
</div>
</div>
</div>
CSS:
#font-face {
font-family: offbeat;
src: url(offbeat.woff);
font-weight: normal;
font-style: normal;
}
body {
margin: 0 auto;
padding: 0;
background: rgb(209,202,178);
}
.header {
background: rgb(175,166,135);
width: 100%;
height: 100px;
margin: 0px;
padding: 0px;
position: fixed;
top: 0px;
z-index: 2;
border-bottom: 1px solid rgb(102,102,102);
}
.table {
display: table;
float: left;
left: 50%;
width: 1150px;
height: 100px;
line-height: 100px;
overflow: auto;
position: absolute;
}
.logo img {
z-index: 4;
position: relative;
left: 50%;
}
.navbar {
float: left;
right: 48.5%;
position: relative;
}
.navbar li {
display: inline;
padding: 0px;
margin: 0 auto;
width: 100%;
margin-right: 40px;
text-shadow: 1px 1px rgb(115,109,88);
font-family: offbeat;
font-size: 20px;
letter-spacing: 5px;
white-space: nowrap;
overflow: auto;
}
.navbar a {
text-decoration: none;
color: rgb(255,255,255);
text-align: center;
border-bottom: 1px solid;
border-color: rgb(255,255,255);
padding: 10px;
margin: 5px;
white-space: nowrap;
}
.navbar a:hover {
background-color: rgb(135,127,99);
}
I would look to use line-height to achieve this. Set the height on the parent container .navbar to 100px then set a line-height of 100px on the .navbar li.
This will mean the link text is always in the centre of the navbar. To ensure the logo was in the centre I would add vertical align middle.
As a bonus I would look to implement box-sizing it greatly helps with layouts that use padding.
#font-face {
font-family: offbeat;
src: url(offbeat.woff);
font-weight: normal;
font-style: normal;
}
*,
*:before,
*:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
margin: 0 auto;
padding: 0;
background: rgb(209, 202, 178);
}
.header {
background: rgb(175, 166, 135);
width: 100%;
height: 100px;
margin: 0px;
padding: 0px;
position: fixed;
top: 0px;
z-index: 2;
border-bottom: 1px solid rgb(102, 102, 102);
}
.navbar {
margin: 0;
padding: 0;
text-align: center;
}
.navbar ul {
margin: 0;
padding: 0;
overflow: hidden;
}
.navbar li {
display: inline-block;
padding: 0px;
margin-right: 40px;
text-shadow: 1px 1px rgb(115, 109, 88);
font-family: offbeat;
font-size: 20px;
letter-spacing: 5px;
line-height: 100px;
vertical-align: middle;
}
.navbar img {
vertical-align: middle;
}
.navbar a {
text-decoration: none;
color: rgb(255, 255, 255);
text-align: center;
border-bottom: 1px solid;
border-color: rgb(255, 255, 255);
padding: 10px;
margin: 5px;
white-space: nowrap;
}
.navbar a:hover {
background-color: rgb(135, 127, 99);
}
<div class="header">
<div class="navbar">
<ul>
<li>Home
</li>
<li>About
</li>
<li>Before & After
</li>
<li>
<img src="http://placehold.it/50x50">
</li>
<li>Portfolio
</li>
<li>Facebook
</li>
<li>
<script src="js/email.js"></script>
</ul>
</div>
</div>
I edit your base code as you used a lot of needed positioning techniques. Please compare with your code.
try adding this to your css
.navbar ul
{
display:inline;
vertical-align:middle;
}
Let the ul padding:20px 0px; direct the center vertically and text-align:center direct your center horizontally. Also use inline-block so that you can give your entire li focus for menu linking purposes
here is your problem solved FIDDLE
p.s. Your main problem is you are using way too much css. This is not supposed to be such a hard implementation and you definitely do not need absolute positioning, but fixed positioning. The rest is just colors.
If you need to give more padding to the top so they look closer to the bottom, use the padding property to distribute the padding as needed (i.e. padding: 40px 0px 5px) etc.
Here is a common saying we have...Use "absolute" only when "absolutely" necessary ;)
heres how i did it.
core change on css:
.navbar {
display:table;
margin: 15px auto;
}
.navbar li {
line-height:70px;
display: block;
padding: 0px;
float:left;
margin: 0 auto;
margin-right: 40px;
text-shadow: 1px 1px rgb(115,109,88);
font-family: offbeat;
font-size: 20px;
letter-spacing: 5px;
white-space: nowrap;
}
simplified html:
<div class="header">
<ul class="navbar">
<li>Home</li>
<li>About</li>
<li>Before & After</li>
<li><img src="http://img1.wikia.nocookie.net/__cb20120630091052/farmville2/images/0/0f/Google-Logo.png" height=70px /></li>
<li>Portfolio</li>
<li>Facebook</li>
</ul>
<script src="js/email.js"></script>
</div>
http://jsfiddle.net/4a8dkz3n/
i messed around a bit on jsfiddle so it might be a bit different,
but basically i gave display:table to so that i can give "margin:0 auto;" to it
and used 'line-height' to vertical alignment of the list menu.
also simplified the code a bit.

html css absolute layout-content coming below footer

I am trying to create a simple page (Only using HTML and CSS) but I am having a difficulty with some elements.
main-nav and content is coming below the footer and tilda. Battling this for hours.
Please help !!!
html:
<div id="container">
<div id="header">
<div id="logo">
<a class="logo-image" href="/Common/vwWelcomeForm">Home</a>
</div>
<div id="version">
Version: <label for="Product_Version">AUSQUAD 1.5 SQL 1.5</label>
</div>
<div id="top-nav">
<label for="">24/10/2013 13:38:44</label> |
Home |
<label for="Administrator">Administrator</label> |
Log Out
</div>
<div id="header-title">
<h2>
Welcome to {<label for="Ausquad">Ausquad</label>}
</h2>
</div>
</div>
<div id="main-nav">
<div role="navigation" aria-label="Main menu">
<ul class="nav">
<li>Security Management
<ul>
<li>Company Setup</li>
<li>User List</li>
<li>Change Password</li>
<li>Module Permission</li>
<li>List Master</li>
<li>Master Groups</li>
<li>User Groups</li>
</ul>
</li>
<li>Message Administration
<ul>
<li>Message Type Master</li>
<li>Enquiry Source Master</li>
<li>Standard Message Master</li>
<li>Message</li>
<li>Message Log Management</li>
</ul>
</li>
</ul>
</div>
</div>
<div id="main-content">
test
</div>
<div id="tilda">
</div>
<div class="footer_left">
Copyright © 2013 Private Limited.
</div>
</div>
Css is:
#container{
width: 100%;
min-height: 100%;
position: relative;
overflow: hidden;
}
#header{
position: relative;
}
#logo{
padding: 0.625em 0 0 1.250em;
float:left;
}
/* converted px to em */
#version{
text-decoration: none;
color: #000000;
font-size: 0.750em;
position: absolute;
top: 4em;
left: 17em;
}
#logo a {
display:inline-block;
}
a.logo-image {
background: url('../images/logo-dashboard.png') no-repeat top left;
width: 147px;
height:76px;
text-indent: -9999px; /* hides the link text */
}
a.advertiser-logo-image {
background: url('../images/Evangelsoft_Logo_Orginal_1.jpg') no-repeat top left;
display: block;
width: 100px;
height: 63px;
text-indent: -9999px; /* hides the link text */
}
#top-nav{
position:absolute;
right:0.5em; /* rtl-review */
top:0.25em;
font-size:0.9em;
z-index: 1000;
}
#top-nav a {
text-decoration: none;
color: #039;
padding: 0.15em 0em 0.15em 0em;
}
#top-nav a:hover{
color: #017cc2;
}
#header-title{
width: 100%;
position: absolute;
top: 20px;
margin: 0 auto;
text-align:center;
}
#header-title h2{
font-size: 1.1em;
font-weight: 600;
border-bottom: 1px solid #cecfce;
color: #039;
margin: 1em 0em 0.5em 0.25em;
line-height: 1.2em;
}
#main-nav{
float: left;
margin-top: 1em;
width: 100%;
}
#main-content{
float: left;
width: 100%;
padding: 10px;
padding-bottom: 60px;
margin-top: 1em;
clear: left;
}
#tilda {
position: absolute;
bottom: 24px;
height: 36px;
width: 100%;
left: 0;
right:0;
}
.footer_left {
bottom: 0;
height: 24px;
margin: 2px 0 0;
position: absolute;
text-align: right;
width: 100%;
padding: 10px 0px 5px 0px;
color: #434343;
border-top:1px solid #ddd;
background: none repeat scroll 0 0 #E8E8E8;
}