Showing posts with label center align. Show all posts
Showing posts with label center align. Show all posts

Tuesday, January 30, 2007

Day of nightmares ...

Ohokie...my new website went live yesterday...and that was 1 day that taught me so much...

IE 6 is definately not standards complient...it takes a perfectly fine CSS and makes a mockery of it...

So, here is a little trick ..

Take a standard CSS...and put some custom tags in for IE6..
/*Standard Tags*/
padding-left:205px; /*left + margin of 10*/
margin-left:25px;
text-align:justify;
/*IE 6 Tags*/
_width:100%;
/*_border:thin solid green;*/
_margin-left:-100px;
_padding-left:0px;

So, when the page is parsed by standard browsers ..(FF, Opera, IE7 etc) they parse the right tags and then give you the pretty page..

IE6 on the other hand would read the tags with underscores and create an acceptable version of the page.....

IE6 and IE7 are very different browsers...No doubts abt it..

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 !!!!