SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Hybrid View

  1. #1
    SitePoint Evangelist
    Join Date
    Mar 2006
    Posts
    407
    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

  2. #2
    Non-Member
    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

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,797
    Mentioned
    158 Post(s)
    Tagged
    3 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

  4. #4
    SitePoint Evangelist
    Join Date
    Mar 2006
    Posts
    407
    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

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,797
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    .however, its not what im after
    From your description it sounds just like what you're 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

  6. #6
    SitePoint Addict greg76's Avatar
    Join Date
    Aug 2004
    Location
    Los Feliz, CA
    Posts
    260
    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?

  7. #7
    SitePoint Addict
    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

  8. #8
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,797
    Mentioned
    158 Post(s)
    Tagged
    3 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

  9. #9
    SitePoint Evangelist
    Join Date
    Mar 2006
    Posts
    407
    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!
    Attached Files Attached Files


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •