You can not directly apply styles to the inner IFrame element through parent window CSS class even though its domain is same as parent.
As ,(All the iframe's domain is the same as the parent) ..
Best thing you can do is ,to add your main style sheet to the IFrame using javascript or jquery.
$(document).ready(function(){
$('#myIframe').load(function(){
$('#myIframe')
.contents().find("body")
.html("test iframe");
$('#myIframe')
.contents().find("head")
.append($('<link rel="stylesheet" type="text/css" href="style.css">')
);
});
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…