Known "position:relative" issues in Firefox 2.x? - firefox

Virgin post.
Are there any known issues with how FF2/Windows handles div's positioned relative?
IEx / Chrome on Windows, FF3x / Safari 4x on Mac are rendering fine. and I would think IE for sure would have barked at me if the coding was incorrect.
<!--example-->
#parent_div {width:200px; height:100px; position:relative;}
#child_div {width:100px; height:50px; position:absolute;}
<div>
<div id="parent_div">
<div id="inner_div">foobar</div>
</div>
</div>

I don't see any errors. Your example renders the same for me in IE, Firefox, Opera, Chrome and Safari. The name mismatch between ‘child_div’ versus ‘inner_div’ may be a problem, but fixing that still results in the same layout over all browsers.

Related

Applying bootstrap only on mobile

I have a legacy website to work on and this does not support any mobile browsers. This web has a gigantic amount of css files and the look & feel of the web is not to be modified. Bootstrap will be used to make the web responsive for mobile users.
The problem is, I'd like the web to apply bootstrap only for mobile browsers. Let's say the following html code is from the legacy web and it's not responsive.
<div id="header">
<div><img src="view/image/logo.png"/></div>
<div><img src="view/image/lock.png"</div>
</div>
If you add row and column classes...
<div id="header" class="row">
<div class="col-xs-6"><img src="view/image/logo.png"/></div>
<div class="col-xs-6"><img src="view/image/lock.png"/></div>
</div>
Now, it is responsive for mobile browsers but .row also changes the margin & padding of #header for PC browsers which is not meant to be. So, I came up with two solutions for this problem.
Import bootstrap under #media.
I think this is impossible because bootstrap already has its own #media queries. Also, having #media under #media is a total nonsense.
Detect whether the current browser is on PC or mobile before loading bootstrap theme.
This is a better solution than #1 and I can't come up with any drawbacks from it.
Are there any alternative approaches to tackle this problem?

Does angularJs validation work in safari?

I have implemented the from which works in Chrome, Firefox and IE, but don't know why it's not working in Safari ..
Here is my plunker.
There is a bug using Safari and if css contains:
-webkit-transition: border-color, box-shadow ease-in-out .15s;
(for example: form-controll in bootstrap uses it)
The form validation becomes invalid forever.
I used Safari on PC so I have no idea if it is also happen in Mac.

VideoJS 'controls' causing video to not play correctly in Firefox (v18.0.1) on OSX (Mountain Lion)

I have VideoJS displaying a video in a modal window in a Wordpress website. I'm NOT using a videoJS plugin, I've loaded the latest VideoJS version to the home directory. The code for the video tag is in a separate non-Wordpress html file all on it's own.
The video IS working fine in Safari on the Mac, it's also working fine in Firefox on Windows. It is NOT working properly in Firefox on the Mac.
I have traced this issue back to it being caused by the 'controls' option in the tag. As soon as I change the options to 'autoplay' and take out 'controls', the video plays perfectly well in Firefox and Safari on the Mac.
More specifically it appears to be the small timer (showing how much video has played) on the skin's slider.
The skin in Firefox is different that the one in Safari. The one in Safari is BLACK and displays the time to the left and right of the slider at the bottom of the player. The one in Firefox is GREY and has the time in a small raised box above the slider at the bottom of the player. It is this raised box that seems to be causing an issue with the video playing in Firefox. The video is only playing slowly on a strip just above the slider and only to the height of the timer box.
I have tried putting:
<script>
_V_.ControlBar.prototype.options.components = {'playToggle':{}}
</script>
right under the call to
<script src="http://vjs.zencdn.net/c/video.js"></script>
in the head of the Wordpress page that has the modal window displaying the separate html page containing the code.
That did NOT work; both Safari and Firefox still show the controls at the bottom of the player.
I also tried adding:
.vjs-default-skin .vjs-time-controls {display: none !important;}
to my WP theme's stylesheet. That did NOT work either.
QUESTION 1: Why is Firefox using a different skin for VideoJS than Safari? If I can get the same controller for Firefox (ie one without the raised time code box) then the video may play normally.
QUESTION 2: How can I limit the controls to show only the large centred play button without showing the controls at the bottom of the player? Again, not having the raised time code box may make the video display normally in Firefox.
QUESTION 3: All this came about because I discovered iPhone and iPad do not play videos with the autoplay setting. I had originally set the option for autoplay in the tag without 'controls', but because it wasn't working in iPad (just getting a black background to the video) I took out 'autoplay' and added the 'controls'. And that's when I noticed the problem in Firefox. So if I can't fix the issue with having controls in Firefox and it not working, is there a way to get round the black screen issue on the iPad and using 'autoplay' for Firefox without controls?
Please let me know if there's any other information you need.
You shouldn't need the code as it's all working; the problem only arises in Firefox on the Mac when I add 'controls' to the tag. And I'm sure this can be fixed by using a different skin or getting rid of the controls at the bottom of the video (well, I'm hoping that will fix it!).
BTW I'm using this in the head of my WP template
<link href="http://vjs.zencdn.net/4.0/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.0/video.js"></script>
Oh, and Firefox is not falling back to the Flash Flowplayer, it's definitely playing the ogg file in the HTML5 video tag.
ctagney, thanks for taking the time to respond.
Question 1
Hmm, strange.
I have this in the header at the moment:
<link href="http://vjs.zencdn.net/4.0/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.0/video.js"></script>
This is the code I have in the html page (I've replaced actual domain with ... as I don't want links to the site --- you can see the video on www. horizonyachtsgrenada .com/ new-yacht-sales-grenada/ at the top of the right-hand side bar:
<div style="margin:0; Padding:0;">
<video id="salesvideo" class="video-js vjs-default-skin" preload="auto" controls width="540" height="320"
poster="http://.../videos/horizon-dream-makers-splash.jpg"
data-setup="{}">
<source src="http://.../video/HORIZON_FINAL_HD.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
<source src="http://.../video/HORIZON_FINAL_HD.ogv" type='video/ogg; codecs="theora, vorbis"' />
<source src="http://.../video/HORIZON_FINAL_HD.webm" type='video/webm; codecs="vp8, vorbis"' />
<!-- Flash Fallback. Use any flash video player here. Make sure to keep the vjs-flash-fallback class. -->
<object id="flash_fallback_1" class="vjs-flash-fallback" width="540" height="320" type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"playlist":[http://.../videos/horizon-dream-makers-splash.jpg", {"url": "http://.../video/HORIZON_FINAL_HD.mp4","autoPlay":true,"autoBuffering":true}]}' />
<!-- Image Fallback. Typically the same as the poster image. -->
<img src="http://.../videos/horizon-dream-makers-splash.jpg" width="540" height="320" alt="Poster Image" title="No video playback capabilities." />
</object>
</video>
</div>
Any ideas why it's not using the video.js?
Question 2
I've added that code to the page now, so hopefully once it's picking up video.js it will pick this up. I assume I won't need 'controls' in the video tag for this to work, is that correct?
Question 3
So, if I'm understanding your link correctly, I'm right in changing it from autoplay to having controls for it to work on the iPad and iPhone.
New issue:
It's not working in Chrome even though there is a webm version of the video! I'm beginning to go greyer ... just want the video to work now!! :(
Any help much appreciated.
Cheers,
Tracy
EDIT: BTW the video does play on Safari, Firefox, and Chrome on a different site (different server, different video code) so it's not the video itself causing an issue.
The players you're describing in firefox and safari sound like the native video players for each browser. In other words, you're not actually using video.js.
Question 1
Once you get it working, you'll notice that the players should look identical to one another in Safari and Firefox. Without seeing your code it's hard to say why your video.js player isn't getting initialized, but you need to do one of the following:
Include a data-setup='' tag in your video element, which you can use to specify options via a JSON value.
Have a separate script that calls _V_("video id", {}) once the page has loaded.
I recommend you use the second option since you have some additional setup to handle (see: below)
Question 2
The big play button you want is automatically hidden when controls are turned off, so you should just call it's show() method once the video player has been initialized.
<script>
_V_("example", {}, function() { this.bigPlayButton.show(); });
</script>
See the following for a working example.
http://jsbin.com/ijipag/2/edit
Question 3
See Can you autoplay HTML5 videos on the iPad?
The issue was I didn't include the call to the video.js
<link href="http://vjs.zencdn.net/4.0/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/4.0/video.js"></script>
in the separate (non-WP) html page that's shown in the modal (FancyBox iframe) window. I've now included that and it's successfully calling the video.js and showing the big play button without the bottom controls in Safari and Firefox.
It's still NOT working in Chrome. In Chrome, when you click the play button it's just showing the poster image and the spinning loading gif.
UPDATE: Got it working in Chrome by moving :
<source src="http://www.horizonmotoryachts.com/video/HORIZON_FINAL_HD.webm" type='video/webm; codecs="vp8, vorbis"' />
above the calls to the mpeg4 and ogg files.
Tested on Firefox and Safari on Mac and its still working.

960gs Opera & Internet Explorer Rendering Issue

So I was testing out the 960gs when I encountered a problem with the Opera & IE8 browser.
Below is an image with the page rendered in Opera (But same error happens in IE8.)
I don't care about the buttons not being styled correctly, but it's the divs aligning horizontally that bugs me.
Below is the same page rendered with chrome (looks the same in firefox).
Anyone knows what the problem might be?
Your HTML has incorrect tags. buttons cannot have hrefs. Only links (a tags) can.
Your CSS does not have gradients for Opera, IE only for Safari/Chrome.You would do that using -o-linear-gradient(top, #ade2ff, #0588fa);
Well, either you use <button> or <a>. If you start your buttons with <button> you can't end them with <a>. Just choose one of them and your grid layout works.

.png images not rendering correctly in IE7, IE8

They look great in FF, Safari, but the social media icons don't render correctly in IE.
http://www.erisdesigns.net/STAGE/ED1.3/
Is this an IE problem, or something to do with how I'm creating the .pngs?
There's a pngfix javascript add-on you can trigger with an IE conditional statement.
PngFix
<!--[if lt IE 7.]>
I think that it's because you use transparency. Although it isn't as clean as the current solution, you should maybe make everything opaque.

Resources