How do I get the max-width of a TD
I have a TD that is styled with a class that gives it a max-width as follows:
- #newDivCenter {
background-color: yellow;
text-align: center;
min-width:788px;
max-width:840px;
}
When I try to retrieve that max-width, I fail. I tried plain JavaScript:
-
var newDivCenter = document.getElementById("newDivCenter");
alert(newDivCenter.style.maxWidth);
but that failed, so would jQuery work instead? How would I try it in jQuery?
So far, it fails on a TD, and also on a TABLE element (I tried both)