RIRedinPA Posted November 11, 2008 Share Posted November 11, 2008 not sure if I phrased that correctly but if I have this css container: #frame1 { position: relative; width: 90%; padding: 0; } #frame1 table { width: 1200px; } how do I edit the table of the container frame1 in javascript? you can obviously do this: document.getElementById("frame1").style.display = "block" but how would I change the width of the table within the frame1 div? Thanks Link to comment https://forums.phpfreaks.com/topic/132327-solved-edit-html-element-of-a-css-container/ Share on other sites More sharing options...
rhodesa Posted November 11, 2008 Share Posted November 11, 2008 try var tables = document.getElementById('frame1').getElementsByTagName('TABLE'); tables[0].style.width = '300px'; Link to comment https://forums.phpfreaks.com/topic/132327-solved-edit-html-element-of-a-css-container/#findComment-688013 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.