Aligning text to the bottom of the page
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Aligning text to the bottom of the page

  1. #1
    Member
    Join Date
    Jul 2006
    Location
    Aberdeen, UK
    Posts
    39

    Aligning text to the bottom of the page

    Hi,

    Is there any other way to get a block of text to align to the bottom of the page?

    Just now I’ve put it in a div then made the positioning absolute and to 550px.

    But when a user with a smaller screen size goes on they will need to scroll to see it as it doesn’t fit on their screen and we do not want the page to scroll at all.

    Any help would be great.

    Cheers

  2. #2
    Senior Member ihoss.com's Avatar
    Join Date
    Oct 2004
    Location
    Norway
    Posts
    581
    position: absolute;
    bottom: 0px;

  3. #3
    Retired Mod aversion's Avatar
    Join Date
    Jun 2000
    Location
    insomnia
    Posts
    7,917
    If the page scrolls that won't keep the block at the bottom of the page in most browsers.

    In modern browsers position: fixed will do it but IE stumbles here, though I think IE7 understands it.

    I know this is a question much asked in web dev forums but I've never seen a satisfactory answer. If you want to support IE you could use javascript to keep the block in the desired position when the page is scrolled or there are CSS hacks that work somewhat. There's an example of a javascript way to do it here or a CSS way here.
    Last edited by aversion; 03-10-2007 at 06:12 PM.

  4. #4
    Member
    Join Date
    Jul 2006
    Location
    Aberdeen, UK
    Posts
    39
    Thanks for both the answers.

    I was able to change my div to what ihoos.com said.

    Thanks again

  5. #5
    Retired Mod aversion's Avatar
    Join Date
    Jun 2000
    Location
    insomnia
    Posts
    7,917
    And your div stays in position even when the page scrolls in IE, Safari and Moz browsers? I'd like to see a solution where position:absolute does that, it would help a lot of people.
    Last edited by aversion; 03-12-2007 at 03:47 PM.

  6. #6
    Senior Member ihoss.com's Avatar
    Join Date
    Oct 2004
    Location
    Norway
    Posts
    581
    aversion, he didn't want it to stay at the bottom of the browser, only bottom of the page

    how does position: fixed work? If you say bottom: 0px; will it stay at the bottom even if you resize the window?

    I'll have to look into this

  7. #7
    Retired Mod aversion's Avatar
    Join Date
    Jun 2000
    Location
    insomnia
    Posts
    7,917
    That's true.

    Position: fixed will make something stick, so it won't scroll with the page. You can 'fix' it anywhere and it won't move. Now IE7 supports it I assume we'll have a gazillion pages with 'stuck' content on them for no reason in a year or so!

  8. #8
    Senior Member ihoss.com's Avatar
    Join Date
    Oct 2004
    Location
    Norway
    Posts
    581
    stop the whining; the web is all about doing stuff for no reason!

Posting Permissions

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




Click Here to Expand Forum to Full Width


HTML5 Development Center

Poll by Flashkit.com