| Tuesday ( @ 2008-05-14 01:04:00 |
Float issue (maybe?)
I keep having this issue but forget to ask for help, mainly because it's kind of hard to explain:
Here I have a sidebar div and a text/content div, both within a container div, and then a footer div outside the container (here's the CSS). The sidebar div is set to "float: left", the text div is not positioned, and the footer div is set to "clear: both". The issue appears when the height of the text div is less than the height of the sidebar div - then the footer jumps up to match the height of the text div as opposed to the sidebar div. I've worked around it by setting a height for the sidebar, but then I have to manually change that every time the sidebar's height changes.
I have the same issue on another site where the sidebar div (float:left) and the content div (not defined) are within a container div, and the footer div (clear:both) is outside it, except here the footer stays below the sidebar but the defined background of the content div jumps up to match the height of the content div as opposed to the sidebar's, which led me to believe that it's not the footer being outside the container that's the problem.
...I hope that made at least some sense, I can try to clarify if it didn't. Any help would be greatly appreciated!
I keep having this issue but forget to ask for help, mainly because it's kind of hard to explain:
Here I have a sidebar div and a text/content div, both within a container div, and then a footer div outside the container (here's the CSS). The sidebar div is set to "float: left", the text div is not positioned, and the footer div is set to "clear: both". The issue appears when the height of the text div is less than the height of the sidebar div - then the footer jumps up to match the height of the text div as opposed to the sidebar div. I've worked around it by setting a height for the sidebar, but then I have to manually change that every time the sidebar's height changes.
I have the same issue on another site where the sidebar div (float:left) and the content div (not defined) are within a container div, and the footer div (clear:both) is outside it, except here the footer stays below the sidebar but the defined background of the content div jumps up to match the height of the content div as opposed to the sidebar's, which led me to believe that it's not the footer being outside the container that's the problem.
...I hope that made at least some sense, I can try to clarify if it didn't. Any help would be greatly appreciated!