Tuesday, January 23, 2007

DIVS browsers and pain.....

Well, why cannot microsoft be more like the rest of the world...

When you put padding in the DIVs ...the world adds...IE substracts....

Ah well....here is a little hack i wrote to get a very stupid background image on this page to align ...

http://dev.itransfer.org/abhilasha/Original%20Illustrator%20File/final_html/new.html

which is going to be www.itransfer.org...

So, here is the stupid hack ...

<script type="text/javascript">

<!--

if (is_ie5up)

{

if (screen.width <= 640)

{document.write("<link rel=\"stylesheet\" href=\"css/ie/640.css\"
type=\"text/css\" />")}

if (screen.width == 800)

{document.write("<link rel=\"stylesheet\" href=\"css/ie/800.css\"
type=\"text/css\" />")}


if (screen.width == 1024)

{document.write("<link rel=\"stylesheet\" href=\"css/ie/1024.css\"
type=\"text/css\" />")}


if (screen.width >=1280)

{document.write("<link rel=\"stylesheet\" href=\"css/ie/1280.css\"
type=\"text/css\" />")}

}

else //the rest of the world falls in this category

{


if (screen.width <= 640)

{document.write("<link rel=\"stylesheet\" href=\"css/ff/640.css\"
type=\"text/css\" />")}


if (screen.width == 800)

{document.write("<link rel=\"stylesheet\" href=\"css/ff/800.css\"
type=\"text/css\" />")}


if (screen.width == 1024)

{document.write("<link rel=\"stylesheet\" href=\"css/ff/1024.css\"
type=\"text/css\" />")}


if (screen.width >=1280)

{document.write("<link rel=\"stylesheet\" href=\"css/ff/1280.css\"
type=\"text/css\" />")}

}

// -->

</SCRIPT>


So, if you are IE, you get special sheets...

BE HAPPY !!!

Reminds me of a joke, though...

How many hours will it take bill gates to screw in a light bulb ?
None..he would just declare the darkness as industry standard..

And when you are as big and powerful as billy you can do that...right ?

Bow to the king !!!!

No comments: