What's up with my Footer CSS ?
Using the Web Dev toolbar in Firefox I can see that it's got a box and it seems to be pushing it all down to the next line - no padding or margins that I can see..
I'm sure it's an easy fix - if someone could point out what's up that would be ace!
Thanks guys!
Website is here for Love Jungle Clothing Brand
Here is the code:
/****** Footer *****/
/*new div Neil */
#footerwrap
{width: 100%;
margin: 0 auto;
text-align:left;
height:40px;
background-color:#000;
clear:both;
margin-top:10px;
overflow:hidden;
z-index:1000;
}
/*new div container Neil */
#footer {
width: 990px;
height:60px;
margin: 0 auto;
padding-top:10px;
background-color:#000;
clear:both;
text-align:center;
z-index:1000;
}
#footer ul {
padding: 0px 0 0 0;
margin: 0 0 0 0px;
list-style-type: none;
}
#footer li {
float: right;
padding: 0;
margin: 0 auto;
display: inline;
}
#footerLeft ul {
padding: 0px 0 0 0;
margin: 0 0 0 0px;
list-style-type: none;
}
#footerLeft li {
float: left;
}
#footer a {
display: block;
height: 40px;
background-repeat: no-repeat;
display: inline;
text-decoration:none;
text-align:center;
font-family: Arial, Helvetica, sans-serif;
font-size: 90%;
white-space:nowrap;
margin:0 auto;
z-index:1000;
}
#footerwrap a {
display: block;
color:#fff;
height: 20px;
background-repeat: no-repeat;
padding-right:40px;
margin:0 auto;
z-index:1000;
}
/****** Footer *****/
/*new div Neil */
#footerwrap
{width: 100%;
margin: 0 auto;
text-align:left;
height:40px;
background-color:#000;
clear:both;
margin-top:10px;
overflow:hidden;
z-index:1000;
}
/*new div container Neil */
#footer {
width: 990px;
height:60px;
margin: 0 auto;
padding-top:10px;
background-color:#000;
clear:both;
text-align:center;
z-index:1000;
}
#footer ul {
padding: 0px 0 0 0;
margin: 0 0 0 0px;
list-style-type: none;
}
#footer li {
float: right;
padding: 0;
margin: 0 auto;
display: inline;
}
#footerLeft ul {
padding: 0px 0 0 0;
margin: 0 0 0 0px;
list-style-type: none;
}
#footerLeft li {
float: left;
}
#footer a {
display: block;
height: 40px;
background-repeat: no-repeat;
display: inline;
text-decoration:none;
text-align:center;
font-family: Arial, Helvetica, sans-serif;
font-size: 90%;
white-space:nowrap;
margin:0 auto;
z-index:1000;
}
#footerwrap a {
display: block;
color:#fff;
height: 20px;
background-repeat: no-repeat;
padding-right:40px;
margin:0 auto;
z-index:1000;
}
Are you trying to use the "footer stick" method? Or do you just want to have the text content sort of vertically centered. If the latter, try this:
Look in your footer file, you have the following html:
<div id="footerwrap">
<div id="footer">
<div id="footerLeft">
<li>Made in Australia</li>
</div>
<ul>
<span>
<center>
<li>Store</li>
<li>About</li>
<li>Press</li>
<li>Stockists</li>
<li><span>Contact</span></li>
</center>
</span>
</ul>
</div>
</div>
This line: <li>Made in Australia</li> needs to be removed.
If you want more info on the footer-stick method check out http://bonrouge.com/~home
Related
I have some kind of an issue:
I have a footer, with text and a Facebook image in it.
For some reason I can't get the facebook icon directly to the right of the text.
Can someone please help me?
here is a link to jsfiddle
<div id="footerwrap">
<div id="footer">
<div class="copyright">2014 - 2015 <span class="bar">|</span>www.website.com<span class="bar">|</span>Created by website<span class="bar">|</span>
<ul>
<li><img src="http://www.commuwise.nl/wp-content/uploads/facebook.png" />
</li>
</ul>Like us on Facebook!</div>
</div>
</div>
And the css:
#footerwrap {
width: 1000px;
float: left;
margin: 0 auto;
clear: both;
}
#footer {
height: 30px;
background: #33FF66;
border-radius: 10px;
border: 1px solid #1feb52;
margin: 0px auto;
text-align: center;
color:#FFF;
}
#footer a {
color:#FFF;
text-decoration:none;
}
#footer a:hover {
color:#FFF;
text-decoration:underline;
}
#footer a:visited {
color:#FFF;
text-decoration:underline;
}
.bar {
font-size: 15px;
}
#footer .copyright ul {
list-style: none;
margin: 0px 0px 0px;
padding: 3px;
float:right;
margin-left:5px;
}
#footer .copyright img {
border: 0px;
}
#footer .copyright {
color: #fff;
line-height: 32px;
margin-left: 5px;
margin-top: 0px;
text-align: center;
}
Thanks!!
Best regards
Here is a js.fiddle: http://jsfiddle.net/DSrn4/1/
In your css code,
#footer .copyright ul {
list-style: none;
margin: 0px 0px 0px;
padding: 3px;
display:inline-block;
margin-left:5px;
}
removed: float:right;
added: display:inline-block;
Try this jsfiddle
<div id="footerwrap">
<div id="footer">
<div class="copyright">
2014 - 2015 <span class="bar">|</span>www.website.com<span class="bar">|</span>Created by website<span class="bar">|</span>Like us on Facebook!<img src="http://www.commuwise.nl/wp-content/uploads/facebook.png" />
</div>
</div>
</div>
Is this how you are wanting it to be? Working Fiddle
#footer .copyright ul {
list-style: none;
margin: 0px 5px;
padding:0 3px;
float:right;
}
#footer .copyright ul li a{
display:block;
margin:0;
padding:0;
}
#footer .copyright ul li a img{
display:inline-block;
vertical-align:top;
padding-top:3px;
}
I can't figure out what is going on here, perhaps it's just too early!!
See this FIDDLE
When clicking on the links below the grey box, it will eventually scroll the relative content from right to left etc. However, when clicking items 2 & 3 in the nav, transport or scholarships, the navigation menu seems to move to the left or disappears completely! If someone could cast an eye, and correct my stupidity it'd be gratefully appreciated!
HTML:
<div class="finance-galleryWrapper">
<div class="galleryView">
<div class="swapView">
<li class="gallery-item" id="Fees"></li>
<li class="gallery-item" id="Transport"></li>
<li class="gallery-item" id="Scholarships"></li>
</div>
<nav class="toggle-nav">
<ul>
<li>Fees</li>
<li>Transport</li>
<li>Scholarships</li>
</ul>
</nav>
</div>
</div>
CSS:
/* --- Galleries --- */
.finance-galleryWrapper {
width: 860px;
height: 559px;
margin: 0 40px;
overflow: scroll;
}
.galleryView {
width: 860px;
overflow: hidden;
display: block;
}
.swapView {
width: 2580px;
height: 427px;
background: #666;
overflow: scroll;
}
li.gallery-item {
width: 860px;
height: 427px;
display: inline;
float: left;
}
/* toggle-nav */
/* toggle-nav */
.toggle-nav {
width:720px;
margin:50px auto 30px;
text-align:center;
position:relative;
z-index:1001;
}
.toggle-nav ul {
margin:0 auto;
}
.toggle-nav li, .toggle-nav li a {
display:-moz-table-cell;
display:inline-block;
*display:inline;
*zoom:1;
}
.toggle-nav li {
width:168px;
}
.toggle-nav li a {
width:171px;
margin:0 auto;
padding:6px 0 7px;
border:1px solid #cfcfcf;
font-family:Open Sans;
font-size:16px;
color:#666;
text-align:center;
text-decoration:none;
background-color:#fff;
}
.toggle-nav li a:hover {
color:#08c;
}
.toggle-nav li a:first-child {
border-left:1px solid #cfcfcf;
}
.toggle-nav li:first-child a {
border-radius:6px 0 0 6px;
box-shadow:none;
}
.toggle-nav li:last-child a {
border-radius:0 6px 6px 0;
}
.toggle-nav li a.active {
position:relative;
cursor:default;
text-decoration:none;
border:1px solid #2284d1;
color:#fff;
background-color:#59b1f6;
}
There you go it works now, however themenu looks different as I was working on it. Change it back again. Your code was very messy and was calling the same ids and classes so many times , i bet your html page was confused as hell and ya like the guy below said that you forgot to put proper position types. Your main one should have had position:absolute. You also missed out on proper display types like display:block
/* --- Galleries --- */
.finance-galleryWrapper {
width: 860px;
height: 559px;
margin: 0 40px;
overflow: scroll;
}
.galleryView {
width: 860px;
overflow: hidden;
display: block;
}
.swapView {
width: 2580px;
height: 427px;
background: #666;
overflow: scroll;
}
li.gallery-item {
width: 860px;
height: 427px;
display: inline;
float: left;
}
/* toggle-nav */
/* toggle-nav */
.toggle-nav {
width:720px;
margin:50px auto 30px;
text-align:center;
position:relative;
z-index:999;
display:block;
position:absolute;
}
.toggle-nav ul {
margin:auto;
display:block;
position:relative;
padding:0px;
}
.toggle-nav li {
display:inline-block;
position:relative;
margin:0px auto;
padding:0px;
}
.toggle-nav a {
width:171px;
margin:0 auto;
padding:6px 0 7px;
border:1px solid #cfcfcf;
font-family:Open Sans;
font-size:16px;
color:#666;
text-align:center;
text-decoration:none;
background-color:#fff;
}
.toggle-nav li a:hover {
color:#08c;
}
.toggle-nav li a:first-child {
border-left:1px solid #cfcfcf;
}
.toggle-nav li:first-child a {
border-radius:6px 0 0 6px;
box-shadow:none;
}
.toggle-nav li:last-child a {
border-radius:0 6px 6px 0;
}
.toggle-nav li a.active {
position:relative;
text-decoration:none;
border:1px solid #2284d1;
color:#fff;
background-color:#59b1f6;
}
I'ld like someone to tip me the way i can fill the gaps of the Grid View Listing.
Below i've inserted all the CSS changes i have from it. Still can't figure it out out to fill the gaps...
The Grid i'm talking about i'ts in bottom of homepage at:
http://findout-macau.com
#content .category_grid_view li p.timing { margin:0; padding:0; }
#content .category_grid_view li p.timing span { color:#000; }
#page .category_grid_view {
width: auto;
padding-left:0px;
}
#content .category_grid_view {
margin:-10 0 20px -15px;
padding:0;
width:650px;
clear:both;
}
#content .category_grid_view li a.post_img {
height:auto;
width:100%;
overflow:hidden;
padding:1%;
}
#content .category_grid_view li a.post_img img {
margin:0 auto;
display:block;
height:auto;
}
#content .category_grid_view li {
background: none repeat scroll 0 0 transparent;
float: left;
list-style: none outside none;
margin: -10 0 20px;
padding: 0 0 0 15px;
position: relative;
width: 140px;
}
#content .category_grid_view li.hr {
display: none;
}
#content {
float: left;
overflow: hidden;
padding-left: 5px;
width: 640px;
}
#content .category_grid_view li a.post_img {
display: block;
margin-bottom: 0;
padding: 0;
background: none repeat scroll 0 0 #FFFFFF;
border: 0 solid #E2DFDF;
box-shadow: 0 0 0 #DDDDDD;
height: auto;
width: 100%;
overflow: hidden;
}
#content .category_grid_view li a.post_img img {
height: auto;
overflow: hidden;
width: 100%;
}
#content .category_grid_view li.featured {
position:relative;
-moz-border-radius:3px;
-webkit-border-radius:3px;
}
#content .category_grid_view li .featured_img {
width:69px;
height:72px;
position:absolute;
left:15px;
top:0px;
text-indent:-9009px;
}
#content .category_grid_view li.featured a.post_img {
border: 0 solid #B1D7E0;
}
#content .category_grid_view li .widget_main_title {
padding-top: 7px;
clear: left;
height: 25px;
overflow: hidden;
background: none repeat scroll 0 0 #EBEBEB;
}
#content .category_grid_view li .rating {
background: none repeat scroll 0 0 #EBEBEB;
display: block;
margin: 0px 0;
padding-bottom: 7px;
padding-top: 7px;
}
#content .category_grid_view li p.review {
background: none repeat scroll 0 0 #EBEBEB;
border-bottom: 10px solid #EBEBEB;
border-top: 1px solid #EBEBEB;
color: #EBEBEB;
margin-bottom: 20px;
padding: 5px 0;
}
The problem is with the image height.
if you set
#content .category_grid_view li a.post_img img { height: 97px }
the Grid View will display good, but the image will look distorted.
try to resize the image to make it look good and keep the height to 97px.
EDIT
#Bdalte's comment
try to put each element/product into a div (let's say with the class wrapper) and set the height with the max height you get from your elements/products.
based on Find out divs height and setting div height
you can use this script
var maxHeight = 0;
$('div.wrapper')
.each(function() { maxHeight = Math.max(maxHeight, $(this).height()); })
.height(maxHeight);
it should look like this
I am trying to scale a menu bar according to screen size. I've tried float, #media etc. but it hasn't worked properly. Full screen on my 13' looks great. However, as soon as I scale it down, the menu bar shifts to the right, but the page elements are fine. Menu is at the bottom #navsite.
CSS
* {
margin:0;
padding:0;
}
html{
min-width:770px;
}
body{
background:white url(candy/background.png) 0 0 repeat;
text-align:center;
}
/*=====[ Set up container divs and add background tiles ]=====*/
#pageheadContainer,
#contentContainer,
#footContainer{
width:100%;
}
#pageheadContainer{
background:transparent url(candy/pageheadBackground.png) 0 100% repeat-x;
}
#contentContainer{
background:#F7F7F7 url(candy/contentBackground2.png) 50% 100% repeat-y;
float:left;
}
#footContainer{
background:transparent url(candy/footBackground.png) 0 0 repeat-x;
clear:both;
}
#pagehead,
#content,
#foot{
width:770px;
margin:0 auto;
position:relative;
text-align:left;
}
#pagehead{
height:130px;
}
#foot{
height:150px;
}
#pagehead{
background:transparent url(candy/pageheadBackground2.png) 0 100% no-repeat;
}
#content{
background:transparent url(candy/contentBackground.png) 0 0 no-repeat;
min-height:300px;
_height:300px;
}
#foot{
background:transparent url(candy/footBackground2.png) 100% 0 repeat-x;
}
#article{
width:450px;
float:left;
padding:40px 0 20px 0;
margin-left:25px;
}
#subContent{
display:inline;
width:180px;
float:left;
padding:25px 0 20px 0;
margin-left:30px;
color:#8B725A;
font-size:.9em;
}
#foot ul{
position:absolute;
top:45px;
}
#foot li{
list-style-type:none;
}
#foot #foot1{
width:200px;
position:absolute;
left:300px;
}
#foot #foot2{
width:200px;
position:absolute;
left:570px;
}
#foot #pageTop{
position:absolute;
left:482px;
top:-40px;
}
#foot #pageTop a{
display:block;
width:26px;
height:26px;
text-indent:-9999px;
text-decoration:none;
background:transparent url(candy/pageTop.png) 0 0 no-repeat;
float:left;
}
body{
font:normal 62.5%/1.8em Arial, Helvetica, sans-serif;
}
#content ul{
margin:0.8em 0 0.6em 1em;
padding-left:1em;
list-style-type:square;
}
ol{
margin:0.8em 0 0.6em 2em;
padding-left:1em;
list-style-type:lower-roman;
}
blockquote{
margin:0.8em 0 0.6em 1em;
padding-left:1em;
font-style:italic;
border-left:4px solid #E2D7CF;
}
img{
padding:2px;
border:1px solid #F2F2F2;
}
#content{
font-size:1.25em;
}
p{
margin:0.3em 0 0.6em 0;
}
a{
color:#9D6141;
font-weight:bold;
text-decoration:none;
}
a:hover{
background:#9D6141;
color:#FFE;
}
#article{
line-height:1.7em;
color:#635141;
}
h1,
h2,
h3,
h4{
font-family:Georgia, Times New Roman, Times, serif;
}
h2{
color:#98533B;
margin-bottom:.5em;
line-height:1.7em;
font-size:1.7em;
}
h3{
margin:0.8em 0 0.6em 0;
font-size:1.3em;
}
h4{
margin:0.8em 0 0.6em 0;
font-size:1.1em;
}
#subContent h2{
font-size:1.3em;
}
#subContent h3{
font-size:1.1em;
}
/* menu navigation */
.navsite {width: 845px; height: 35px; z-index: 100;
margin-bottom: 3px; margin-left: 155px;}
/* menu bar */
#headermenu {width: 800px; height: 35px; z-index: 100; position: absolute}
#headermenu ul {
text-align: center;
list-style: none;
line-height: 20px;
font-size: small;
}
#headermenu a {
display: block;
width: 8em;
color: white;
text-decoration: none;
padding: 0.3em;
white-space: nowrap;
}
#headermenu li {
float: left;
padding: 0;
width: 8em;
background-color: #B67357; /* medium brown */
}
#headermenu li ul { /* second level lists */
position: absolute;
z-index:500;
left: -999em;
height: auto;
width: 8em;
border-width: 0.25em;
margin: 0;
}
#headermenu li:hover ul, #nav li.shfhover ul {
left: auto;
z-index:100;
}
#content {
clear: left;
color: #ccc;
}
#media screen and (max-width: 770px)
{
#headermenu {
width:770px;
margin:0 auto;
position:relative;
text-align:left;}
}
So your problem is you're absolutely positioning the menu from the left of the browser. So when you resize it it moves.
If you want the whole site to be centered but fluid you can use the following
width:100%; max-width:400px; margin:auto;
Here's a Fiddle
I have add a footer background image.It's look perfect on my PC. But it show up not correct on iPad browser. I'm try to upload image to show you guy but i'm very new on stackoverflow so i can't upload.If anyone know how to show you guy an image. Please let me know i will upload it. Please have a look at the Black part bottom right. Anyone please help me to fix this problem
Thank you
I add this line to my css.
.footer{ border-top: 4px solid #00b0bd; }
.footer a{ color: #000000;}
.footer-container { width:100%; text-align: left; background: url("../images/footer/footer_damask.gif") repeat scroll 0 0 #333333;}
.footer { margin: 0 auto 15px; width: 960px; }
.aditional-footer { margin:0 auto 0; padding: 30px 0 30px; width: 960px; background-image:none !important;}
.footer .links li { text-transform: none; }
.footer-container a { color:#666669; font-size: 11px; width: 960px; }
.footer-container .footer-right { width: 250px; }
.footer .f-right { width:429px; text-align: right; padding-right:20px; }
this is my full CSS.
/* Footer ================================================================================ */
.footer-social-container { width:100%; background: none repeat scroll 0 0 #404040; border-top: 0 solid #00aebb;}
.footer-social { width:960px; padding: 5px 0; margin:0 auto; }
.footer-social .phone { color:#111; float:right; font-size:16px; }
.footer-social .follow_us { display: inline-block; font-size: 16px; margin: 0; float: left; color:#ffffff; }
.footer-social .twitter,
.footer-social .rss,
.footer-social .facebook { margin-left: 5px; text-indent: -9999px; display: inline-block; float: left; background-repeat: no-repeat; background-position: top center; height:24px; width:30px; }
.footer-social .twitter:hover,
.footer-social .rss:hover,
.footer-social .facebook:hover { background-position: bottom center; }
.footer-social .twitter { background-image: url(../images/twitter.png); }
.footer-social .rss { background-image: url(../images/rss.png); }
.footer-social .facebook { background-image: url(../images/facebook.png); }
.footer-social .gift_img { float: left; border-left: 1px solid #00afbc; border-right: 1px solid #00afbc; padding: 0 50px; margin: 0 0 0 100px; }
.footer{ border-top: 4px solid #00b0bd; }
.footer a{ color: #000000;}
.footer-container { width:100%; text-align: left; background: url("../images/footer/footer_damask.gif") repeat scroll 0 0 #333333;}
.footer { margin: 0 auto 15px; width: 960px; }
.aditional-footer { margin:0 auto 0; padding: 30px 0 30px; width: 960px; background-image:none !important;}
.footer .links li { text-transform: none; }
.footer-container a { color:#666669; font-size: 11px; width: 960px; }
.footer-container .footer-right { width: 250px; }
.footer .f-right { width:429px; text-align: right; padding-right:20px; }
.footer ul { display:inline; }
.footer li { display:inline; background:url(../images/bkg_pipe1.gif) 100% 50% no-repeat; padding:0 5px 0 0; margin:0 3px 0 0; }
.footer .links li.last { background:none !important; padding-right:0 !important; }
.footer .bugs { margin:0; color:#666; }
.footer .bugs a { font-weight:bold; color:#353535; }
.footer address { color:#666; }
.footer address a { color:#353535; }
.policy li { margin-left:2px; padding-left:10px ; line-height: 1.5; background: url(../images/footer_li.png) no-repeat left top;}
.policy li:hover { background: url(../images/footer_li.png) no-repeat left bottom;}
.footer-container .form-subscribe { }
.footer-container .form-subscribe label { padding-top:2px; font-weight:bold; color:#555; }
.footer-container .form-subscribe .input-box { border: 1px solid #EFEFEF; width: auto; float: left; height: 27px;}
.footer-container .form-subscribe button.button { float:left; width: 58px;}
.footer-container .form-subscribe button.button span { height: 22px; font: normal 11px/22px Tahoma, Verdana, Arial, sans-serif; }
.footer-container .form-subscribe input.input-text { width: 180px; border: 0px solid #d6d4d4; border-right:0; padding: 0; padding-left: 8px; float:left; height: 27px; line-height: 27px; }
.footer-container .form-subscribe input.input-text:focus { border: 1px solid #FF292C; border-right: 0; height: 25px; line-height: 15px }
.footer-container .form-subscribe input.input-text.validation-failed { background: none!important; border-right:0!important; }
.footer-container .form-subscribe .validation-advice { position: absolute; width: 171px; margin-top: 31px; background: white; padding:5px; }
.footer-container .footer-callout { display:block; margin:-10px 0 10px; position:relative; }
.footer-container .store-switcher { color:#555; text-align:right; }
.footer-container .store-switcher label { font-weight:bold; vertical-align:middle; }
.footer-container .store-switcher select { padding:0; vertical-align:middle; }
.footer-container .bottom-container { margin:0 0 8px; text-align:right; }
/* ======================================================================================= */
Not an iPad specific problem, rather a low horizontal resolution one. I've the same bug in Chrome when my window is narrow.
Why ?
Your .page is 960px wide, overflowing your body which is 100% (768px on iPad)
Your footer is 100% width, so the same width than your body, 768px.