Google Groups Home
Help | Sign in
Padding and Border size
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Frank Salem  
View profile
 More options Jul 15, 5:21 am
Newsgroups: microsoft.public.scripting.jscript
From: "Frank Salem" <frankc...@activediscovery.net>
Date: Tue, 15 Jul 2008 17:21:42 +0800
Local: Tues, Jul 15 2008 5:21 am
Subject: Padding and Border size

    Sir/Madam:

    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!!!


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Anderson  
View profile
 More options Jul 15, 6:00 pm
Newsgroups: microsoft.public.scripting.jscript
From: "Dave Anderson" <NPQRWPDWZ...@spammotel.com>
Date: Tue, 15 Jul 2008 17:00:18 -0500
Local: Tues, Jul 15 2008 6:00 pm
Subject: Re: Padding and Border size

"Frank Salem" wrote:
> ...mainDiv.style.width=Math.round(bodyDiv.offsetWidth)+"px";

>    This code work only IE6 but not on Firefox and IE7...

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.


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Frank Salem  
View profile
 More options Jul 15, 10:01 pm
Newsgroups: microsoft.public.scripting.jscript
From: "Frank Salem" <frankc...@activediscovery.net>
Date: Wed, 16 Jul 2008 10:01:07 +0800
Local: Tues, Jul 15 2008 10:01 pm
Subject: Re: Padding and Border size

What  I mean is that it "work properly" only on IE6 but on FF, the mainDiv
is being pushed to the right side.
Thanks!

"Dave Anderson" <NPQRWPDWZ...@spammotel.com> wrote in message

news:C66dnV1U-ZxogODVnZ2dnUVZ_rbinZ2d@posted.visi...


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google