Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1101697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:04:21+00:00 2026-05-17T01:04:21+00:00

i was going smooth with my html and css codes until this problem i

  • 0

i was going smooth with my html and css codes until this problem i am facing now and i don’t know what is happening.

my html patterns is like this.

in the top is <div id="header"> which does not have any fixed width. i have used an image and used the repeat-x property. and in the header i have navigation menu wrapped in the container of 940px;

in middle is the <div id="content"> which is wrapped with container of the same 940px;

till the content div my codes are fine. now i am facing the problem in positioning the footer correctly. my footer should not have any fixed width and should not be wrapped in the container. so i defined the footer div outside of the content and container div that is right before the closing of body and html tag.

when i do this the footer image which have the dimension of 50px X 290px; goes upward and is placed from the content div. it does not come to the bottom. i am using temporarily margin-top:1600px; to position it correctly which is wrong.

why is it not inheriting the position, i tried giving every position attribute. it is not working :(,

what am i missing?

P.S: the code was lil lengthy so i didnt post it here, instead i explained what is happening. if you still want to see my code i can try and put the minimal code.

thank you

EDIT : Here is the link to jsfiddle and my code. http://jsfiddle.net/32ShZ/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T01:04:21+00:00Added an answer on May 17, 2026 at 1:04 am

    The problem seems to have been that the #footer wasn’t clearing the floated divs (and gosh, you do like your divs don’t you? 70? In one document?). So, adding:

    #footer {
    clear: both;
    width:940px; /* copied from your other divs */
    }
    

    seems to have worked. I’m not sure, as yet, why the #footer isn’t respecting margin: 0 auto; but still, it seems to be moving on the right tracks. Have a look at: jsfiddle.net/32ShZ/3/ (you’ll note I’ve used some jQuery to populate all the divs, so I could see what was where. And added a background-color to #footer to make it more visible, these are, clearly, optional).


    Edited in response to comment:

    i am confused about the jQuery code. what is it exactly.?

    jQuery is a JavaScript library, written to provide a cross-browser compatible abstraction, so that, for the most part, one set of code should produce consistent results cross-browser, from IE to Chrome. Its api is available to review online, over at: jQuery.com.

    $('div').each(
        function(i) {
            $(this).append('<p>Div (' + i + ') ' + $(this).attr('id') +'</p>');
        }
    );
    

    The code I used, step by step:

    1. found all the div elements on the page, $('div')
    2. iterated over each of those elements, and applied a function. The i is an iterator .each(function(i){...})
    3. worked on the current element, $(this)
    4. appended a <p> to the element, with text contents `.append(‘

      Div (‘ + i + ‘) ‘ + $(this).attr(‘id’) +’

      ‘)

    5. the $(this).attr('id') section looks at the current element and finds its ‘id’ attribute, inserting that into the string.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

need a little help. My jQuery was going smooth today until I hit a
Going mad now. I have a MVC solution that i've upgraded from MVC 1
My CSS-fu is letting me down here: What I'd like to do is position
I've been working on a project in Eclipse and everything's been going smooth except
I am trying to get silverlight smooth streaming going on a site I am
i need to smooth better this kind of plot, I've already used a moving
I am creating an app and everything is going smooth but when I rotate
I was attempting to make a horizontal smooth-scrolling one-page website. I would like a
Disclosure: I know nothing about web programming Background to problem: I have an environmental
Going through happstack-lite tutorial : we build functions that have return type of ServerPart

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.