ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  reading margins at run-time -- HELP!!!!!  shoq at 23:23 on Wednesday, August 16, 2006

I am trying to set a table cell height by setting a div inside it.

Thus, I want to set the div height to the overall height I desire the cell to be.

Alas, browsers include padding and borders in the offsetHeight property,but NOT margins. I need to get that to calculate properly.

Unfortunately, I can't seem to read the value in any possible combination. (I can get borders and padding by subtracting style.height from offsetheight)

I have tried style.marginLeft, and all permutations. I am searched the web can cannot find any reference to reading this attribute.

But surely it must be attainable. Can anyone solve this?

You would think it would simply be

val = parseInt(,10);

but it's not.

(The parseInt() func just strips the px text from the value. eg. "100px"

Useful Links

CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums

Recent Forum Threads
• Run a program both on windows and linux
• VERO.SurfCAM.v2014
• Schlumberger.Petrel.V2013.2
• Petrel.V2013.2
• Altair.HyperWorks.v12
• VoluMill.v6.1
• VoluMill.NEXION.6
• VERO.SurfCAM.v2014
• Schlumberger.Petrel.V2013.2

Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text

© Copyright 2001-2015