SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Pandora Tipem's Avatar
    Join Date
    Feb 2006
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Align Text To Bottom of DIV

    Hello,

    I have a div with all of the page's content in it. Then at the bottom there is a div class for my footer. Is there any way I can get the footer to align vertically to the bottom of the div? I've tried the verticle-align property, but it has no effect.

    Regards,
    Tipem no fancy sig, yup
    Need Neopets Help? Try Neopets
    fun adoptable eggs

  2. #2
    SitePoint Member
    Join Date
    Dec 2005
    Posts
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If it is inside the main div, try this in your footer div style:

    bottom:0px;


    Steve

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2004
    Location
    USA
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Or "bottom: 0;" to be more precise. Anything set to zero doesn't require units.
    You might also want to place some sort of clear div before you insert your footer class, that could be causing it to not appear properly.
    i.e
    .clear { clear: both }

  4. #4
    Pandora Tipem's Avatar
    Join Date
    Feb 2006
    Posts
    450
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've tried using that before, but it's really whacky. It aligns itself to the bottom of the window, not the div. Plus your code didn't even make a difference in the page (I believe you have to use position: absolute or position: relative; I've seen it used like that before).

    You see, I have a left and right column. The left column is my main content, the right column is the navigation. My footer is grayed out text in my left column div.

    e.g.,

    Code:
    <div id="left">
    	<p>all my cool content here</p>
    
    	<div class="footer">
    		Copyright 2006 MySite.com
    		Here is a threatening message.
    	</div>
    </div>
    <div id="right">
    	my1337n4v1g4t10n
    </div>
    EDIT: CompressedAir, what good would a clear: both do?
    Tipem no fancy sig, yup
    Need Neopets Help? Try Neopets
    fun adoptable eggs


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
  •