Alright I have a CSS liquid div based layout for my personal web site. The address is
http://danberinger.com/preview.html
The problem is the I do not want the footer section to act as if it were displayed inline, because right now when the window is stretched beyond the pixel width needed for the intro_container, it moves the footer div to the right of it. I would like this footer to stay put at the bottom of the page rather than moving up and to the right when space allows for it.
Thanks for any help you can offer. I have loved this forum so far, very helpful.
#footer {
clear: both;
}
This will ensure it is always pushed down below all other floated content. This seems to provide the effect you are asking for.
here is css fix for it
#footer{
position:absolute;
bottom:0;
}
Related
I spent a lot of time trying to figure out how to make my footer responsive (sticking to the bottom of the page, no matter what page). I finally figured out the code to make it do this:
position: absolute;
bottom:0;
But now, certain pages have the footer stuck in the middle. What seems to be happening is that the footer div is not recognizing the wrapper (body) div above it on certain pages. So the footer just stops at a certain point and the body continues to keep expanding.
You will see what I mean at http://library.skybundle.com/product-training/account-settings/
I'm sure there is a simple line or two of CSS that will fix this issue. Please help!
You need to set position to fixed instead.
#footer-bottom {
position:fixed;
bottom:0;
}
That will stick it to the bottom of the page.
Fixed refers to it's position in regards to the browser window, absolute is it's place on the page itself.
By the way, that is not what responsive means in regards to web design. Responsive refers to the page responding to the width of the page. Just FYI to avoid confusion in any future questions.
I have been struggling with this problem for a long time now, and although I have found a number of good solutions to parts of my problem, none of them seem to work combined, so I have decided to ask you.
Here is a scrn shot of the website:
http://i.stack.imgur.com/6C0k1.jpg
What I'm hoping to achieve is to have a scroll bar appear on the far right of the page when content overflows the blue container, the div that has all my content in it, not the far right of the div itself, like it would if I set the div to overflow: auto or overflow: scroll.
In other words, I would like the page to scroll, not my div.
The site essentially consist of a body background, a div for the menu and a div for the content. The code is pretty messy, so I have left it out, but if you need it, just leave a comment and I will add it right away.
Everything is supposed to be fixed as in remain like it is on the scrn shot, except for the content in the blue container to the right. I initially figured that setting everything except the container to position:fixed would work and trigger a scroll bar to appear for the page that could be used to scroll through the div, but it didn't. This doesn't work though, as any visible overflow in the container just 'leaves' the page; it doesn't trigger a scroll bar.
As I've also pointed out in the scrn shot, the container-div has padding on the top and bottom and is also slightly transparent.
These two features seem to make things even more difficult. The padding, because setting overflow: visual makes content overflow, and thereby be visible, even through padding.
The transparency is an issue, since I can't just cut out the padding and give it a z-index that's higher than the content itself, in order to hide it; it will still be visible through it. The background image is set at a percentage or set to 'cover' (still figuring out which one works best), so cutting out the padding with the segment of the background image it covers, will not work either.
I hope I presented my problem and the issues clearly enough. If you have any questions or any feedback, please leave a comment.
Thank you in advance for any replies,
Magnus
NOTE: This is a repost of an early question that was trashed by someone who didn't bother reading through it properly before rating it down. The question essentially died afterwards. I have tried to make things even more clear this time, so I'm sorry if I repeat myself. This is also the reason why my post is so long this time.
Something like this?
Demo: http://jsfiddle.net/6R7c2/
HTML:
<div id="top">Top</div>
<div id="middle">
<div>Content
</div>
</div>
<div id="bottom">Bottom</div>
CSS:
html,body{
width:100%;
height:100%;
margin:0;
}
#top,#bottom{
height:10%;
background:blue;
color:white;
}
#middle{
height:80%;
overflow:auto;
}
#middle>div{
height:10000px;
border:25px solid red;
}
It can be something like this
see http://jsfiddle.net/QfsvB/
CSS
div.scroll
{
background-color:#00FFFF;
width:100px;
height:100px;
overflow:scroll;
}
HTML
<div class="scroll">You can use the overflow property when you want to have better control of the layout, the overflow property specifies what to do if the content of an element exceeds the size of the element's box.</div>
I have a website which contains a large (and wide) table. The table is placed inside jquery UI tabs.
It looks something like this: http://jsfiddle.net/Tq3Rg/
For the user this can be somewhat annoying since he has to go all the way to the bottom of the table and page to scroll right.
Is it possible to make the scrollbar always appear fixed on the bottom of the page?
Set a fixed height (and don't use inline-styles):
Your altered Demo
the code:
.top{
height:10%;
}
.center{
overflow:scroll;
height:80%;
}
.bottom{
height:10%;
}
If you really want to have the scrollbars at the very bottom of your page, you could check this answer on how to achieve this without needing custom scrollbars and such stuff.
Just set some fixed height to your middle div
like
<div style="background:white;overflow-y:scroll;height:400px;">
You need a custom scrollbar to do this, have a look http://baijs.nl/tinyscrollbar/ or http://www.jquery4u.com/plugins/10-jquery-custom-scrollbar-plugins/#.T_RSYxEe4hU.
I'm trying to do jquery pagination, however I'm having a problem keeping the navigator on the bottom, even with clear: both.
The problem is that the navigation div <div class="alt_page_navigation"></div> needs to be right where </ul> ends and cannot be in another div, or else the pagination get's broken.
Another problem is that because the page is dynamic, I don't know the width of the alt_page_navigation beforehand.
Here's a live page example, I've tried everything google spit up, to no avail.
If anyone knows of a simple solution, please let me know :)
Thank you :))
Clear won't work with your inline-block display, but you need that for centering.
Try this solution for creating a clearing div, then put
<div class="clearfix"></div>
between your products and your pager.
Put padding at the bottom equal to the height of your nav, and position like so:
.wrapper { position:relative; padding-bottom:1.5em }
.nav { height:1.5em; position:absolute; bottom:0 }
For example: http://jsfiddle.net/CwrMq/
But there's no reason to use absolute positioning, either; just make it a proper display:block item. For example: http://jsfiddle.net/CwrMq/1/
Your .alt_page_navigation div has display: inline-block set on it. If you delete this line in css - your div will clear the floats. If you want its content to be in the center of the page simply add text-align: center to it and make sure that its content is inline-block (now your a are block-level). You can see the working example here: http://jsfiddle.net/6FNH6/
Here is a solution i tend to use in situations like this.
Your paginator needs to go inside a container that positions it horizontally
See this fiddle - http://jsfiddle.net/94MwF/1/
Basically you are using text-align to horizontally center it, and position absolute to put it at the bottom.
I'm having trouble figuring out how to make the my pictures div show in the right place
here is a fiddle which looks worse the my page bust will give you an idea of what i"m trying to do
here is how it really looks a the of the page and at the `!
as you can see the div "pictures" has space above the pictures inside it and they pictures are pushed out at the bottom making my gradient incorrect.
I can't figure out where the extra space is coming from
additional
there is additional space on the right that grows while you expand the browser window until the next picture can fit then it shrinks. how can I make it so it stays at like 10px until the next picture fits
The problem you're having is that the div.spacer at the top of your pictures DIV is clearing the floated a.home (the sidebar, if I'm not mistaken). A possible solution would be to put overflow:hidden on the pictures DIV.
(Basically, you can control the "scope" of CSS clear by using overflow to create what is called a "block formatting context". If you apply overflow:hidden to the pictures DIV, then clear:both elements inside of that DIV cannot clear floats outside of that DIV.)
You have top: 200px; in the CSS of your pictures div
Hard to tell with the JSFiddle but:
div.pictures {
position:relative;
top:200px;
width:90%;
margin:auto;
background: rgba(255,255,238, 0.25)
}
Looks like that top:200px; rule is adding significant space.
try putting a <br style="clear:both;" /> at the end of the div!
Set top in the div.pictures to 0px;. However, it's difficult to tell if this is the result you want using Fiddle.