Rooturaj's Blog

The words of a Techie who loved Nature.

Text content outside Div IE | Duplicate Characters Bug IE6

Posted by rooturaj On July - 14 - 2010

Hey Programmer,

Since you are on this page I know you are a web developer.  Cheers mate. I hope you have not spent one whole night awake and skipped dinner like me when you had a deadline and Microsoft Internet Explorer acted up. Especially the God Damned IE6 which should, IMHO, be banned and all users using that browser be taxed $1000 a year as Anti-Development tax. I am not exaggerating. We waste our time and electricity on fixing code for IE6 and that should be charged on users who don’t upgrade to Firefox or Opera or Chrome.

Anyway I wanted to share with you a peculiar error on IE6. You see parts of your content duplicated for no apparent reason. If it not aligned properly or breaking orientation its understandable…but showing some characters that make the end of the content is just outrageous.  Now see this example -

a simple instance of the bug - snapshot

a simple instance of the bug - snapshot

Notice the pink area in the footer. I have set the height of container divs and the two yellow/blue halves as same. The last three characters of my content in right half is being duplicated.  I know its like majic but who the hell likes this shitty magic?

How to recreate the bug?

<!--main div statrs here-->
</code>
<div style="height: 300px; width: 300px; background: none repeat scroll 0% 0% #ffccff; float: left;">
<!--sub div statrs here-->
<div style="height: 300px; width: 300px; background: none repeat scroll 0% 0% #ffccff; float: left;">
<!--left div statrs here-->
<div style="height: 300px; width: 150px; background: none repeat scroll 0% 0% #ffff99; float: left;">This is content in left div. This is content in left div. This is content in left div. This is content in left div. This is content in left div. This is content in left div. This is content in left div.</div>
<!--left div endshere-->
<!--right div statrs here-->
<div style="height: 300px; width: 150px; background: none repeat scroll 0% 0% #00ffff; float: left;">
Right div text material here. Right div text material here. Right div text material here. Right div text material here.Right div text material here.Right div text material here.Right div text material here.</div>
<!--right div ends here-->
</div>
<!--sub div ends here-->
</div>
<!--main div ends here-->

How to fix this IE duplicate characters issue?

The fix is rather simple .. You got to limit the use of comments. Yeah…for some ‘God Knows Why’ reason using comments can lead to bugs in your HTML coding. From what I have read about this ..it seems IE6 has a margin buffer on right..that is if you have a box with 100px width you cannot have two boxes inside it with 50px width each.

1. You need to provide atleast 3px free space on right so that Microsoft guys might stick their thing there. (sorry for being rude)
2. Else you need to remove the comments. The comments seem to trigger the bug in most cases.

Either one of the fixes or their combination should work for you. If it does not you can curse me in the comments for wasting your time and continue your search on internet.

This post is to address an every day issue that you face when working with spread sheets (MS Excel – OpenOffice Spreadsheets etc). We normally cannot print spreadsheets with a background. I mean when you print the document it does not show the background graphic.

When confronted with this problem I googled it up. (Sorry can’t help. it’s a habit) Now Microsoft, as we all know, are charming people who love it when you have trouble using their product. They said “This issue occurs because background graphics cannot be printed in Excel.” How smart and what a useful answer. Guess what they even ask “Did this information solve your problem?” I felt like kicking that bloke who wrote this in the ‘you know which’ place.

Ok enough.. Now here is the solution.

Setting a background for your Microsoft Excel Spreadsheet

backgorund-excel

I hope the screen-shot would suffice. All you need to do is go to the main menu. Then Choose Format >> Sheet >> Background.

Browse the image file and select it.

The back ground will get tiled all over the work area. There is no overriding this I guess. So choose a proper sized graphic to fit your printable area.
Tip: Use white space around the image (photoshop or other graphic tool) to fit it wherever you want on the printable area. See this example.

Seriously I do

Seriously I do

Now if you want to print the same you would never get the background. Try and check the print preview.

So How to Print the Spreadsheet along with the Background?

Save the file as webpage. (.html or .htm)

Then open the file in your browser and print as you like. Remember to do the print set up properly. On my Firefox I do this.

print-setup

Hope that helped.

RESTful time for PHP developers working with ADO.NET

Posted by rooturaj On September - 7 - 2009

Microsoft’s open source community manager, Peter Galli reported on this post about the new technology to bridge Microsoft .NET developer’s platform and widely popular PHP server side scripting language. The open source community is glad that this finally came up. PHP programmers can now connect to ADO.net data services with ease. It was not possible for Apache based clients to draw data form MS SQL servers with .net platform.

They use RESTful service interface to connect the previously stranger (to each other) internet data sharing methods. Sources say that full support will be available in Visual Studio 2008 SP1 and the forthcoming 2008 build.

Full report at http://news.idg.no/cw/art.cfm?id=3E8FFC06-1A64-6A71-CEB8414EFC373373

The PHP toolkit is available at Microsoft CodePlex site for open source projects.

Will Google Chrome OS kill Windows in India

Posted by rooturaj On August - 20 - 2009

I was just checking out a news piece on the level of software piracy in India. But I was not surprised to know that software piracy in India is as high as 73% when compared to 23% in US. You would not be surprised either. [Source: Hindu Business line] The Indian subcontinent is the new piracy hub in Internet world. We read at colleges and technical institutes that run on pirated software. Even though a single user copy is bought it is used in over 50 PCs.

The most used piece of software in India is probably the windows. (all versions included) But only those people who get branded PCs or laptops have a genuine windows copy. Other who assemble their systems are on pirated ones mostly. Hardware dealers and computer sales people install windows on assembled PCs for 250 rs. Some of the 10 standard kids in the alley will call me crazy for quoting 250 INR, they would do it for 100. Or coax your techie friend and get it free with technical support from the ‘techie’ group.

With this situation in mind I was thinking if Google new chrome operating system came free with added speed, more Internet applications and less system crashes then will it kill Microsoft Windows in India? It is a tough thing to answer at this point of time.

Chrome Vs Windows

Chrome Vs Windows

Here are some points to Chrome’s favor.

OS Cost : I have a feeling that software cost being the first priority in India rather than security, this could be a winner for Chrome.
Legal Pressure : Now Indian authorities are pressing it hard with NASCOM against software piracy. So if they are left with a choice of choosing between Microsoft of 1500 Rs and Google for free I guess many wood go for Google.
Brand Power : Google is a hugely popular brand in India as well so if brand loyalty is considered then they are almost even.
Performance : Now if we weigh performance then those who have used Google and its products have got hardly any thing to complain. On the other hand you will get more complaints than compliments for Windows and other MS products.

Points in Favor of Windows

User Friendliness : Windows has one big advantage in shape of User Friendliness. Not many people would prefer to learn a new OS. The same thing that happened to Linux. Operating system is more or less synonymous to Windows in India. It would take a while to wrench this reputation out of MS grasp.
Supporting Software: We have grown up on MS Office, Media Player etc. Will Chrome provide support for this or will it be the rise of Internet office applications?
Hardware and Driver Support : Manufacturers of hardware are today MS centric. Will this hamper Google’s Chances?
There are more questions. So it remains to be seen. Will Google Chrome Kill Microsoft Windows in India?

VIDEO

TAG CLOUD

Sponsors