How to apply css to an iframe
There are two different things here: the style of the iframe block and the style of the page embedded in the iframe. You can set the style of the iframe block the usual way:
<iframe name='iframe1' id="iframe1" src="empty.htm" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
The style of the page embedded in the iframe must be either set by including it in the child page:
<link type="text/css" rel="Stylesheet" href="Style/simple.css" />
Or it can be loaded from the parent page with Javascript:
var cssLink = document.createElement("link") cssLink.href = "style.css"; cssLink .rel = "stylesheet"; cssLink .type = "text/css"; frames['frame1'].document.body.appendChild(cssLink);
Relevant Content
- Farb Schemas für Webdesigns finden und entwickeln
- Freelancer for Drupal, SEO and Crestron Roomcontrol at www.hn-worX.de
- Captcha und WebForm unter Drupal
- Howto: TinyMCE in einem Panel Pane PopUp
- Google Calendar Sync mit Outlook
- HTML Page mit DIV zentrieren
- beamer.de - Ihr Anbieter für Medientechnik
- Umstieg von Wordpress auf Drupal
- Wordpress und die Suchmaschinen
- t0b1's Page endlich online