I'm using an... Iframe. Need help!
Hello everyone,
As you may or may not know, I run my own internet radio station. My radio station has a variety of ways to tune into the station, and one way is Browse 'n' Play.
Browse 'n' Play allows you to browse the web whilst being tuned in. The Browse 'n' Play radio panel is located at the bottom of every page so you can control the radio at your fingertips!
What I have done, is set up Google in the iframe and having the bar at the bottom which has my radio:
PlanetVolume: Browse 'n' Play
I have two problems. My problems are:
1) Due to cross browsers, my Browse 'n' Play feature only works in a few browsers, like Chrome, but not IE9 or older ones. The Iframe's height it extremely small, about a quarter of the page!
2) My second problem is when it is working fine (on Chrome), when I am using Google search and browsing the net, the Iframe gradually decreases in height after every link I click! After about 9 or 10 different pages my iframe decreases so much it's fustrating!
If you want the codes, let me know. Otherwise you can view source at PlanetVolume: Browse 'n' Play
Please note: I am not amazing at coding, so please do try to keep your answer as basic as possible!
Thanks alot!
Re: I'm using an... Iframe. Need help!
Well for starters, the iFrame's height style (in CSS) is set to 86px.
That's pretty small.
You can technically do this in JavaScript and have it work in most browsers, down to IE6 as far as I know, and it can work..
You can't really make an element, such as an iframe, constrain to a height based on the browser window's size and have it work on all browsers and operating systems.
I've gotten things like this to work using jQuery, but I'm not going into very much detail.
Basically, the CSS/markup doesn't know the browser's viewable size for any given user, and even if it did, a resize would mess everything up.
Percentages work great for widths, but the <body> tag's height isn't a real static number, and I'm not sure why it isn't yet possible to base other elements off of that height using percentages, but it doesn't work.. yet.
In the mean time, like I said, u can look into a way to use JavaScript to control the height, and adjust whenever the browser is resized by the user.
Re: I'm using an... Iframe. Need help!
Thank you for your help. I cannot find where it says 86px though?