SitePoint Sponsor |
|
User Tag List
Results 1 to 9 of 9
Thread: Position Div bottom of window
-
Sep 5, 2007, 07:47 #1
- Join Date
- Mar 2006
- Posts
- 412
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Position Div bottom of window
Hi, please dont shot me down, however im unable to find a solution that will satisfy most browsers.
I would like to position a div at the bottom of the screen, whether the window content is short or you need to scroll down five or six pages.....the div will always be at the bottom.
The main reason for my difficulty is that the image will be used a 'background' and always behind the main content, therefore i cant think how i can construct the page so that a content div will 'push' ithe image down.
i hope someone can help...many thanks in advance
-
Sep 5, 2007, 07:59 #2
- Join Date
- Jan 2005
- Location
- Netherlands
- Posts
- 4,300
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Hello
? Yes Div's do that by them selves ? even if you implement a 100% hight model ? but without your code or even better a link to your page we just guess
-
Sep 5, 2007, 08:20 #3
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
See the faq on putting a footer at the bottom of the window because I'm guessing this is what you are asking.
This example uses the technique to position the footer.
http://www.pmob.co.uk/temp/2col-nofloatdrop2.htm
If you are taking about a fixed positioned footer then things get a lot more complicated and a biyt unstable.
http://www.pmob.co.uk/temp/fixed-header-footerx1.htm
-
Sep 5, 2007, 10:22 #4
- Join Date
- Mar 2006
- Posts
- 412
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks Paul O'B
Ive seen these examples before....however, its not what im after....the worse thing is dont how what the correct terminology is to be more specific...
What im looking to do is add a background that covers the lower section of the
window (for example, 400px height, 'behind' any other div containing contents etc). If there is long text, the background will move down...touching the browser window. Therefore footers arent applicable as they depend on 'something' pushing it down.
The reason i want to use a div, is that itll contain a TL'd, 100% flash movie.
...i hope this makes it a little more clearer than mud!
Many thanks for your suggestions
-
Sep 5, 2007, 10:50 #5
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
.however, its not what im after.
The footer in the example will sit on the bottom of the window when there is no content. When content is greater than viewport height it will only then push the footer downwards thus still leaving the footer now at the bottom of the document (not the window).
I don't see how this differs from your explanation. You may need to draw me a picture
-
Sep 5, 2007, 11:04 #6
- Join Date
- Aug 2004
- Location
- Poland
- Posts
- 274
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I am also confused, but maybe Barney is talking about the ad section that sits always at the bottom of the SCREEN, like the ads here at SitePoint, promoting books?
But in that case, 'behind' does not make any sense. Well, 'behind' makes any sense no matter what. Why BEHIND? what's the purpose of it?
-
Sep 5, 2007, 11:27 #7
- Join Date
- Sep 2001
- Posts
- 320
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
maybe set it in a div with 100% height and give it a background positioned on the bottom of the div? i often will make a div inside a div, giving the outer div a top background and the inner div a bottom background. that way i can make nice little headers and footers.
not sure if this is what you're after though.Steve Davis
-
Sep 5, 2007, 11:54 #8
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Looks like we're all confused lol
perhaps you mean a fixed background image that will stay in position no matter what the content does.
e.g.
http://www.pmob.co.uk/temp/fixed-bgimage.htm
-
Sep 5, 2007, 12:16 #9
- Join Date
- Mar 2006
- Posts
- 412
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks all for your input....and sorry for the confusion!
Ive just read your last post Paul...just what i was after (well nearly). What im after is the same 'style', but rather than adding a image, it would be a div in the same position (as i need to acomodate my .swf file...)
anyways, before i saw your position i did you a little picture!
Bookmarks