While attempting to validate the code on my webpage, I encountered an error stating that the "marginheight" and "marginwidth" attributes of my iframe should be set in CSS instead. Through research, it appears that this cannot be achieved directly through CSS. However, I believe it may be possible using JavaScript.
Following advice from another source, I attempted the following code without success:
document.GetElementById("myIframe").marginheight="0";
When checking
alert(document.GetElementById("myIframe").marginheight="0");
, it only returns "undefined".
Do I need to compromise between having a validated site or including an iframe with no margins? Is there a solution that allows for both?