Is it possible to set I-Frame source in a CSS style sheet?
I am using CSS media queries to set up a web page, I want the homepage to just be a 100% x 100% background image with an iframe centralised on it. However I want different content to load depending on screen size / resolution of the person viewing.
I can use CSS media queries to render the iframe appearance (width / height / position / etc) as I want, but depending on which query it fits I also want source to change... is this possible? Can I list source as a CSS style or must it be within iframe tag? If it is possible any idea how as nothing I try seems to work!
and a few other similar approaches. Then in the html <iframe class="frame1"></iframe>
- Squashed OrangeLv 78 years agoFavorite Answer
- Anonymous4 years ago
Put this in the <head> area of the web pages you want the stylesheet linked to: <link href="mystylesheet.css" rel="stylesheet" type="text/css"> bear in mind that the path to "mystylesheet.css" will change if your HTML files are in different folders than your css file.