Submit Your Article Forum Rules

Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: css issue: footer div at top of markup

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    19

    css issue: footer div at top of markup

    Hi guys

    I am trying to find a way to position the footer at the base of the page using css but I want the content of the footer to be the first div in the html. For example:
    <body>
    <div id="footer"> Footer links etc here</div>
    <div id="content"></div>
    </body>

    I have tried a number of ways and have come close but in ie it put the footer at the bottom of the viewport.. which is in the middle of the page if you scroll down. Has anyone done this or seen any resources that may help please?

    Thanks
    Naz

  2. #2
    Junior Member mjsmith's Avatar
    Join Date
    Jul 2008
    Posts
    5

    Re: css issue: footer div at top of markup

    What are you trying to do make the footer at the top? Then this wouldnt be a footer its gonna be header.. Anyway, could you give us a link for the site so we may take a look?

  3. #3
    Junior Member
    Join Date
    Jun 2008
    Posts
    19

    Re: css issue: footer div at top of markup

    No I want the footer to display in the browser at the bottom like a footer should But I want the code and content of the footer at the top of the markup. It's for an seo experiment.
    I can't put the actual site up here but if I do a test tomorrow I will link to that.

  4. #4
    Junior Member mjsmith's Avatar
    Join Date
    Jul 2008
    Posts
    5

    Re: css issue: footer div at top of markup

    Hmm, thats a bit odd. lol.

    Anyway, in your css for your "footer" class, try adding
    Code:
    position: absolute;
    bottom: 0;
    that would make the footer go at the bottom of the page.

  5. #5
    Senior Member ran_dizolph's Avatar
    Join Date
    Jul 2005
    Posts
    561

    Re: css issue: footer div at top of markup

    mjsmith is correct on both fronts. Absolute positioning will pull the footer out of the regular flow and put it in it's own space. It doesn't make a whole lot of sense to do what you're doing though. As far as I'm concerned, a 'footer' at the top of a page is a 'header'.

    Sticky Footer is a sweet method to keep your footer where it belongs: At the bottom of a page.

  6. #6
    Junior Member
    Join Date
    Jun 2008
    Posts
    19

    Re: css issue: footer div at top of markup

    :S I have it working.. was a little more complicated. I will post up an example of how I did it in case anyone is interested. In the end it came down to the fact that much of what I had was correct by it needed the right doctype to make it work in all browsers. Lol.. it IS a footer and it IS at the bottom of the page.. maybe I didnt explain right both times.. its only at the top as far as where it is in the markup / code / html.

  7. #7

    Re: css issue: footer div at top of markup

    Let us know the outcome of your experiment (assume you want bots to read the content of the footer first, right?). As it happens, on our site we do something similar - but in reverse. We have a line of 'promotional text' that appears on the page above the h1 tag and main content but in the markup we've put it in below.

    Our current SEO experiment: Does it matter where your website is hosted?

  8. #8
    Junior Member
    Join Date
    May 2005
    Posts
    20

    Re: css issue: footer div at top of markup

    Quote Originally Posted by naz View Post
    In the end it came down to the fact that much of what I had was correct by it needed the right doctype to make it work in all browsers.
    So what doctype was needed?

  9. #9
    Senior Member deepsand's Avatar
    Join Date
    May 2004
    Location
    State College, PA
    Posts
    16,648

    Re: css issue: footer div at top of markup

    Quote Originally Posted by Web-Design-Guy View Post
    Let us know the outcome of your experiment (assume you want bots to read the content of the footer first, right?). As it happens, on our site we do something similar - but in reverse. We have a line of 'promotional text' that appears on the page above the h1 tag and main content but in the markup we've put it in below.
    Bots don't "read" anything; they merely fetch a page, cache it, and then go get another one.

    When that cached page is eventually indexed, the indexing engine assigns it to a processor for parsing; it does not "read" it in the sense that you mean. In fact, the parser doesn't care about the order, so long as it's unambiguously parsable.

    What evidence is there to demonstrate that the indexing engine weights content according to its position within a page?

  10. #10

    Re: css issue: footer div at top of markup

    Of course bots don't "read" anything - in the sense you have assumed I meant. Perhaps my language was a bit lose but I think most people here (amateurs and pros alike) will have understood what I meant.

    In terms of SEO - and it is as much art as it is science - my belief is that the order of content on a page is important. Much like a news report, with the 'biggest' headline and story of the day always coming first.

    Notice also in search results themselves - the descriptive line under the main link often includes eg. email addresses, telephone numbers, dates, odd wording etc. Click thru and you'll usually find this content top of page in the source (when, to encourage click thru, a proper description may / probably would work better).

    Like I said, it's my belief. Perhaps others have opinions?

Page 1 of 2 12 LastLast

Similar Threads

  1. Simply Markup
    By Uncle Dog in forum Browsers
    Replies: 1
    Last Post: 08-04-2009, 10:05 PM
  2. Semantic Markup
    By Steven1976a in forum Search Engine Optimization Forum
    Replies: 1
    Last Post: 05-26-2007, 09:06 AM
  3. Can good code (markup) improve your rankings?
    By Webnauts in forum Search Engine Optimization Forum
    Replies: 34
    Last Post: 01-15-2007, 06:17 PM
  4. Get Down With Markup
    By WPW_Feedbot in forum Graphics & Design Discussion Forum
    Replies: 0
    Last Post: 02-15-2005, 09:30 AM

Posting Permissions

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