Can someone help with this code below? I create two divs namely bodyDiv
and mainDiv. mainDiv
was appended to the bodyDiv. I set the same width for the two. Now, my
problem is that when I
add padding and border for the mainDiv, it got an unpleasant look The
mainDiv seems to react only
to the paddingTop and paddingLeft but not for the paddingRight, it was
being pushed to the right
of the mainDiv/bodyDiv. paddingRight seems to be not working. What
should I do with it? Should I adjust
also the width of the mainDiv because of padding and border?
Here's the code:
mainDiv.style.paddingTop=Math.round(bodyDiv.offsetWidth*0.010)+"px";
mainDiv.style.paddingLeft=Math.round(bodyDiv.offsetWidth*0.010)+"px";
mainDiv.style.paddingRight=Math.round(bodyDiv.offsetWidth*0.010)+"px";
mainDiv.style.border=Math.round(bodyDiv.offsetWidth*0.009)+"px solid
#000000";
mainDiv.style.width=Math.round(bodyDiv.offsetWidth)+"px";
This code work only IE6 but not on Firefox and IE7...
Please help!
Thanks in advance!!!
Define "work". Does the Firefox Error Console indicate an error?
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
"Dave Anderson" <NPQRWP...@spammotel.com> wrote in message
news:C66dnV1U-ZxogODV...@posted.visi...