Sunday, 16 July 2017

IE7 Issues Text Indent

                 Unfortunately IE 7 is still widespread among the users hence while theming we have to give special importance to the great Internet Explorer.

Regarding the Text-indent: -999px issue use the following instead for IE7:

text-indent:0;
font-size:0px;
color: #fff;


Now how to differentiate between IE7 and the other browsers?

If your theme is clashing severely with the different browsers you can create different stylesheet (.css) for each browser and use javascript to detect the browser the use is using.

But if you are having issues with only IE7 do the following:
add below the <body> tag:
<!--[if IE]><div id="IEroot"><![endif]-->
add above the </body>
<!--[if IE]></div><![endif]-->

Then in your stylesheet extract the divs and make the change
Eg #IEroot div {color: red}

Monday, 3 July 2017

Javascript basic tutorial

Javascript basic tutorial

Let's start our journey into the learning of JavaScript by typing in the following HTML code. We will add to it and eventually wind up with a working clock similar to the one above. Of course it will take us a several lessons to get there because we first need to learn the basics.

 <HTML>
 <HEAD>
 <TITLE>Our First Script</TITLE>
 </HEAD>
 <BODY>
 <CENTER>
 <H1>Our First Script</H1>
 </CENTER>
 <P>Today is
 </BODY>
 </HTML>

Save this code as script1.html.  It looks something like this when we load it into our browser by using File/Open on the menu.

Our First Script
Today is



Not very exciting! Lets add some JavaScript to our code. Add the following script after the line <P>Today is

 <SCRIPT Language="JavaScript">
 var today = new Date()
 document.write(today)
 </SCRIPT>

Your html code should now look like this.

 <HTML>
 <HEAD>
 <TITLE>Our First Script</TITLE>
 </HEAD>
 <BODY>
 <CENTER>
 <H1>Our First Script</H1>
 </CENTER>
 <P>Today is
 <SCRIPT Language="JavaScript">
 var today = new Date()
 document.write(today)
 </SCRIPT>
 </BODY>
 </HTML>

Save this script and reload it into you browser. It should render something like this:

Our First Script
Today is Mon Jul 03 2017 15:54:47 GMT+0530 (India Standard Time)




Still not real exciting, but remember this is only our first script and does demonstrate something you can't do with plain HTML.

IE7 Issues Text Indent

                 Unfortunately IE 7 is still widespread among the users hence while theming we have to give special importance to the grea...