Iframes and CSS

How to apply CSS to iframe?

var cssLink = document.createElement(link)cssLink.href = style.css;cssLink.rel = stylesheet;cssLink.type = text/css;frames[frame1].document.body.appendChild(cssLink);