Are there little issues there?
Ok, I have been trying to help a friend forever with this, and I really have no idea.
I suppose I will just sum up the issues I think may be a problem, and maybe this rings a bell with you:
1. when placing a div within another div, in Mozilla, if the outer div is position:absolute, the inner one's width is 0.
1. position absolute in mozilla: does it position with respect to its containing div, or the body?
2. does a absolutely positioned div in mozilla size to content?
3. What should your body style be set too? this is what i do currently:
0. The inner div should resize just fine. The outer div will resize to wrap snugly around the inner one if needs be.
2. Relative position should be according to the nearest positioned element in all browsers. Absolute position is the body though.
3. Yep, it resizes to content.
|var currentleft = document.getElementById('theID').style.left; |
var currentwidth = document.getElementById('theID').style.width;
Just remember that some browsers will report with "px" on the end, others won't.
5. The body styles look fine. I would, however, change background-color to just background. Also, absolute positioning isn't necessary for the body tag. Use padding: 0px as a shorthand for left/bottom/right/top.
Note: Just make sure to have a <noscript> tag apply "acceptable" styles in case JS is turned off.
thank you very much drdoc for your replies. you may have noticed i did change my amount of questions: seems you were too quick in answering :)
But again, thanks.
It's important to test, test, test, and test again!
CSS and JS are by no means impossible to mix, just difficult. Very difficult ;)
Ok he figured it out: 2 issues he was having:
1. He wasn't adding "px" to his numbers when setting left, width, and so on.