I have a popup that pops up right underneathe a jQuery is ideal if you can use it. or you might need to use try this ... let me know if it helps With jQuery, you could use so it looks like the (don\'t ask why). on 1024 *760 its the same width as the tab
var element = document.getElementById('whatever');
//or however you want to get the element
var width;
if (typeof element.clip !== "undefined") { width = element.clip.width; }
else {
if (element.style.pixelWidth) { width = element.style.pixelWidth; }
else { width = element.offsetWidth; }
}
$('#popupId').width( $('#cellID').width() );
outerWidth()
, depending on your needs.<script language="javascript" type="text/javascript" >
$(document).ready(function () {
var tableWidth = $('#testTable').outerWidth();
var thOneWidth = $('#testTable th.#one').outerWidth();
var thTwoWidth = $('#testTable th.#two').outerWidth();
alert('Table width : ' + tableWidth + ' \n' + 'Table Col One width : ' + thOneWidth + ' \n' + 'Table Col Two width : ' + thTwoWidth + ' \n');
});
</script>
$('td').outerWidth();
You would likely need to add a class to the TD element in order to specify it with your jQuery selector. By the way, this jQuery method uses the outerWidth property "baked in" to JS, but jQuery is easier :)