Results 1 to 4 of 4

Thread: CSS2 Help

  1. #1
    Marmoset Warrior
    Join Date
    Feb 2004
    Location
    Hastings
    Posts
    1,390
    Thanks
    3
    Thanked
    0 times in 0 posts

    CSS2 Help

    I just started learning CSS2 (i already got CSS1 down) and I have come across a few problems:

    In my site, I have a navigation column that is aligned to the left using postion: absolute. The rest of my page is fine in the layout (used the margin to stop text going over the navigation bar) but I have a problem with my footer.

    It is a small big of text and a small logo. What I am having trouble with is positioning it using the postion attribute.

    When I set the following:
    Code:
    left: 50%; top: 100%;
    If the page is resized (something very thin and tall) the footer stays exactly one page width from the top, and the other text flows over it.
    Is there a way I can make sure the footer is always at the bottom of the page?
    Here is the code I have at the moment for the footer:
    Code:
       <div id="lrlogo"><p>Copyright © 2004 LAN Revolutionaries<br />
          <a href="main.htm" title="Enter LANRevolutionary.net"><img src="images/logo.gif" border="0" alt="LAN Revolutionaries" width="68" height="16" /></a>
          </p>
      </div>
    At the moment I have just placed the footer at the end of the document but on short pages (where there is not a page full of text, I would like the footer at the bottom of the page, without using <br /> tags which would not be dynamic.

    Any help would be greatly appreciated

  2. #2
    Senior Member Kezzer's Avatar
    Join Date
    Sep 2003
    Posts
    4,863
    Thanks
    12
    Thanked
    5 times in 5 posts
    Not sure unless i'm looking at it but you could position it from the bottom of the page instead but generally you want to make sure that text doesn't overflow the copyright thingy.

    My plan would be to position it from the bottom of the page as opposed from the top (it _should_ work)

  3. #3
    HEXUS.net Webmaster
    Join Date
    Jul 2003
    Location
    UK
    Posts
    3,108
    Thanks
    1
    Thanked
    0 times in 0 posts
    This is the biggest failing of CSS. There are several tricks to get footers to work when the main content is dynamic in size but using height :100% will only work if the content is never bigger than the screen as the height is the height of the containing object and in this case that is the screen, not the content on the page.

    I'd need to see your site to propose the best way of implementing this

  4. #4
    Marmoset Warrior
    Join Date
    Feb 2004
    Location
    Hastings
    Posts
    1,390
    Thanks
    3
    Thanked
    0 times in 0 posts
    Damn
    My site isn't actually running yet (i'm in the process of re-coding it from my old Frontpage version) but I should have it online sometime soon, maybe a week or so.
    I'll post in here again when it is up.
    Cheers anyway

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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