quirks

SPAN Height in Firefox

Using CSS, I'm trying to specify the height of a SPAN tag in Firefox, but it's just not accepting it (IE does, funnily enough). Firefox accepts the height if I use a DIV, but the problem with using a DIV is the annoying line break after it, which I can't have in this particular instance. I tried setting the CSS style attribute of: dis...

Javascript Browser Quirks - array.Length

Code: <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <title>Unusual Array Lengths!</title> <script type="text/javascript"> var arrayList = new Array(); arrayList = [1, 2, 3, 4, 5, ]; alert(arrayList.length); </script> </head> <body> </body> </html> Notice the extra comma in the array declar...

2.9999999999999999 >> .5?

I heard that you could right-shift a number by .5 instead of using Math.floor(). I decided to check its limits to make sure that it was a suitable replacement, so I checked the following values and got the following results in Google Chrome: 2.5 >> .5 == 2; 2.9999 >> .5 == 2; 2.999999999999999 >> .5 == 2; // 15 9s 2.9999999999999999 >...

Has anyone else seen this IE6.0 Display problem?

Has anyone seen this type of IE display problem? Note that it is doing some sort of word-wrap/duplication when it renders. The code for the brown box and the text that should be in it is: <div class='span-23'> <div class='span-7'> <div class='info_box' style='height: 30px; padding-top: 10px'> <div class='span-4'><b>Vehicle Ful...

Why are C character literals ints instead of chars?

In C++, sizeof('a') == sizeof(char) == 1. This makes intuitive sense, since 'a' is a character literal, and sizeof(char) is defined to be 1 by the standard. But in C, sizeof('a') == sizeof(int). That is, it appears that C character literals are actually integers. Does anyone know why? I can find plenty of mentions of this C quirk but no ...

Table cell selection in IE7 and FF3

I'm trying to implement html table row selection in IE7 and FF3. When user clicks on the row with ctrl key, he can select separate rows. When he clicks with shift key he can select rows range (so in other words: I'm trying to implement items selection like in the select box or in file explorer). I have javascript for highlighting selec...

What quirks are in the Blackberry Web Browser that a developer should be aware of?

Before I start pulling my hair out on any "known issues", is there any quirks or problems that I should be aware of. Specifically with cookies, JavaScript, HTML, CSS and images. PS I have a copy of the docs provided by RIM, but I'm hoping others know of some lesser known issues. ...

Is IE the only web browser that requires <script></script> and hates <script/>?

How awful is that, after an hour of hunting and pecking, I figured I might as well contribute to the world the awful truth that the only reason your javascript failed to work in IE is because you thought you could pull a fast one on it and use your fancy xHTML shortcut. I've read the dtd and I can't really find any basis for IE being s...

VerticalSlider inside a Dialog: issue with IE

In general, I have no trouble using a dijit.form.VerticalSlider (with right decorations). Everything usually works fine in Firefox, Safari, IE6 or IE7. Things go pear-shaped in IE6 or IE7 when I try to put that VerticalSlider inside a dijit.Dialog. In that scenario, it still works great in FF and Safari, but in IE 6 and 7, there are a...

How to programmatically turn off quirks mode in IE8 WebBrowser control?

I want to use IE8 as a WebBrowser control in a C# application. How can I disable "quirks mode" and force IE into standards compliance (as far as it is implemented)? ...

Reason for CSS property precedence?

I actually know how the browsers tend to render the following examples (results based on Opera 9.5 and Firefox 3.0), but I don't understand the reason behind them. Take this example, <style type="text/css"> #outer{color:red;} .inner{color:blue;} </style> <div id="outer" class="outer"> <div id="inner" class="inner"> <span>test...

IE strict mode flicker on activex controls

I have a web page containing (amongst other things) several activex controls embedded in it. It's only ever rendered in IE, and it's in strict mode. If I highlight any text in the page (or rollover an image with an onmouseover event to change it's image or whatever), the controls all flicker horribly. If I change the page to quirks mo...

IE7 input:focus

I have the following CSS which isn't working in IE7. input:focus{border-width: 2px;border-color: Blue; border-style: solid;} Basically, I just want to set the border attributes when the input is focused. Works in Firefox etc... If anyone could explain why it isn't working in IE 7 and suggest a possible workaround it would be appreci...

What is the most esoteric internal feature you have found or read about?

For me it is the security cookie created for each process to prevent buffer-overflow attacks. Tracking its creation with a debugger, it's created by xoring the Thread ID, the Process ID, the PerformanceCount the TickCount and more... And then if by any chance the most word is zero, then the least word is copied into it... ...

Write a C program to find the smallest of three integers, without using any of the comparison operators.

I found this question online and have been struggling to come up with an answer to it on my own. Bonus question I found. Write hello world in C without using a semicolon. ...

SQL Server: Calculation with numeric literals

I did some testing with floating point calculations to minimize the precision loss. I stumbled across a phenomen I want to show here and hopefully get an explanation. When I write print 1.0 / (1.0 / 60.0) the result is 60.0024000960 When I write the same formula and do explicit casting to float print cast(1.0 as float) / (cast(1...

PHP quirks and pitfalls

I've realized that, although most of my experience consists in writing PHP applications, I find myself making "beginner mistakes" from time to time. This because PHP is a language that has grown very organically and as such has some idiosyncrasies, quirks and pitfalls that I don't know about. I'd like this question to be a wiki for all ...

Background animation problem with jQuery

I am creating a page that uses AJAX to switch content, and each of the 5 pages have their own background colour. Changing the page, makes the current background animate to the new one. I have 24bit PNGs with alpha transparency which overlay the background colours changing (it works alright). There is however, one small problem. On occa...

IE7 doesn't render part of page until the window resizes or switch between tabs

I have a problem with IE7. I have a fixed layout for keeping the header and a sidepanel fixed on a page leaving only the "main content" area switch can happily scroll it's content. This layout works perfectly fine for IE6 and IE8, but sometimes one page may start "hiding" the content that should be showing in the "main content" area....

Ternary operator and string concatenation quirk?

Hi I just want to know why this code yields (at least for me) an incorrect result. Well, probably i'm in fault here $description = 'Paper: ' . ($paperType == 'bond') ? 'Bond' : 'Other'; I was guessing that if paperType equals 'Bond' then description is 'Paper: Bond' and if paperType is not equals to 'Bond' then description is 'Paper...