Blackmajik Posted May 2, 2010 Share Posted May 2, 2010 function fullheight() { var bottompixels = document.getElementById('bottomnav'); for(var x = 0; x < 200; x++) { bottompixels.style.marginTop = x+"px"; }} this is the javascript i started but cant figure out when to break out when the div hits the bottom of the page <div id="bottomnav"><ul id="bottomnav-list" class="clearfix"> <li><a href="test17.html">WEBSITE RESOURCES</a></li> <li><a href="test18.html">SITEMAP</a></li></ul></div></div><div id="footer"></div></body></html> this is the html im using and trying to do the top margin function on the div with id bottomnav. anyone have any ideas? or if a different way is better for this. i think using javascript to get the "position y" coords to check when its at the bottom but it looks like you can only get those coords in javascript if you set them in javascript so im having some trouble. Link to comment Share on other sites More sharing options...
Blackmajik Posted May 4, 2010 Author Share Posted May 4, 2010 Here is the html page im doing this on: http://beyondmeta.net/wordpress/ I want it to look like this one: http://beyondmeta.net/BeyondMeta/ <----homepageany other ideas on how to make the footer always go to the bottom of the page? If theres enough content to fill the page it will fit snug and perfect on the bottom like homepage but if there is not enough like a short blog post it has a huuuuge gap at the bottom between footer and bottom of browser. Think i know one way to fix but itll take almost an entire recode of xhtml/css on the layout. any suggestions? Link to comment Share on other sites More sharing options...
dsonesuk Posted May 4, 2010 Share Posted May 4, 2010 why not use min-height: using this will force it to be a set height (except in ie6), until content goes beyond this height. Link to comment Share on other sites More sharing options...
Blackmajik Posted May 5, 2010 Author Share Posted May 5, 2010 why not use min-height: using this will force it to be a set height (except in ie6), until content goes beyond this height.dont think that would work since ppl have different screen sizes footer would not rest at 0px bottom on all people browsers Link to comment Share on other sites More sharing options...
Synook Posted May 5, 2010 Share Posted May 5, 2010 Why don't you just use http://www.themaninblue.com/experiment/footerStickAlt/?Anyway, dsonesuk means using it with a percentage value. Link to comment Share on other sites More sharing options...
Blackmajik Posted May 6, 2010 Author Share Posted May 6, 2010 Why don't you just use http://www.themaninblue.com/experiment/footerStickAlt/?Anyway, dsonesuk means using it with a percentage value.thank you for the great link. i have to do a big recode to use it that way and i dont wanna do that right now. but future project im definitely using that method it is so much easier! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.