How to write browser specific css

Usually when it comes to browser specific css we often mean IE specific code. You might be aware of the conditional comments tag you can use to target different versions of Internet Explorer. But 2day i’ll be showing you a much simpler way to tame IE 6 and 7 to your needs . Lets suppose for some reasons you want a div to have a height of 10px in all browsers, but a height of 12px in IE 7 and 15px in IE 6, here is how it can be done without the use of conditional comments:

div {
//for all browsers

//for IE 6,others will ignore this

//for IE 7

isnt it much simpler than writing conditional comments?
The same technique can be applied to other properties as well. You can even use this hack to request your IE 6 users to upgrade to a modern browser,how? Just make a div and write your message in it and set its “display” to “none” while set “_display” to “block”.This will simply tell all browsers not to display the div while IE 6 will. Hope you enjoyed the post.


Javascript quadratic equation solver

Here is a simple javascript that solves quadratic equations of the form ax²+bx+c = O. You just have to specify the values of a ,b and c and the script then calculates the two real roots alpha(x1) and beta (x2)  of the equation. The script also tells you if the equation has a real root or not, depending upon the value of D (Discriminant). The equation is solved using the quadratic formula x = -b±(b²-4ac)½/2a .
The script is located here ->

Here is the source code of the script :

//Place this within the  section
<script type="text/javascript"><
function calculate()
     var a=prompt("enter value of a");
     var b=prompt("enter value of b");
     var c=prompt("enter value of c");
     var a2=2*a;
     var ac=4*a*c;
     var dis=b*b;
     var dis=dis-ac;
        document.getElementById('Equation').innerHTML='No real roots exist since Discriminant < 0 !<br />D = ' + dis + ' <br />The Equation = ' + a + 'x&#178; + ' + b + 'x + ' + c + '<br />';
        document.getElementById('x1').innerHTML='&nbsp; ';
        document.getElementById('x2').innerHTML='&nbsp; ';
        var dis_sqrt=Math.sqrt(dis);
        var x1=-b+dis_sqrt;
        var x1=x1/a2;
        var x2=-b-dis_sqrt;
        var x2=x2/a2;
        document.getElementById('Equation').innerHTML=" Equation = " + a + "x&#178; + " + b + "x + " + c + "<br />";
        document.getElementById('x1').innerHTML=' Alpha (x1) = ' + x1;
        document.getElementById('x2').innerHTML=' Beta (x2) = ' + x2;

//Place this within the section:
<h1><a onclick="calculate()" href="#"> Click to solve »»</a></h1>
    <div id="Equation"></div>
    <div id="x1"></div>
    <div id="x2"></div>



.htaccess – A quick guide

.htaccess , Whats is it?

According to Apache:

.htaccess files (or “distributed configuration files”) provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof

‘Directives’ usually refer to the commands that are contained in the .htaccess files, which control or modify your server’s various behaviours. Many free and paid web hosts permit you to change and modify your .htaccess files but remember if you have a website running on Yahoo Geo Cities,Goolge sites or freewebs then this article is meaningless for you cause they dont allow access to .htaccess files

What can you do with .htaccess?

.htaccess can be used in many different creative ways , but its most common usage is for:

  • Setting up custom 404 error pages
  • Enable/Disable directory browsing
  • Change default homepage for a directory
  • Block certain users from accessing your site
  • Block specific refferers
  • Prevent certain files from being viewed
  • Block Hotlinking

How to create one?

Create a text file from any text editor, Note Pad,Text Pad and save it as .htaccess ( remember the period before htaccess and no .txt extension ).
Upload it in your home directory…The rules in .htaccess file apply to all the sub directories in your files directory

Doing some cool stuff

Now here comes the real thing…
To enable your server to use a custom 404 file not found page for broken links or URL typos…
include the following code in your .htaccess file:

[code lang="php"]
#The page notfound.html should be in the same directory as your .htaccess
ErrorDocument 404 /notfound.html 

#Alternatively you can specify just raw html to be used instead of a page
ErrorDocument 404 "<h1>yikes! that  page passed away a while ago...</h1>"

Enable / Disable directory browsing
[code lang=”php”]
Options +Indexes
## Block some specific file types from showing
IndexIgnore *.avi *.mp3 *.pdf

Change directory homepage

[code lang=”php”]
##the pages are used in order
DirectoryIndex myhomepage.html index.html index.php

Block some users from accessing your site
[code lang=”php”]

order deny,allow
deny from
deny from
deny from
allow from all


Display your visitors IP address using php

The following line of code shows your visitors their IP address,

<?php echo $_SERVER['REMOTE_ADDR'] ?>'

For knowing what all super globals are available for you use the function phpinfo(); or print the complete $_SERVER array using print_r($_SERVER);


Get a free domain with top class free web hosting!

Are you a desperate blogger/webmaster stuck with your free webhost where server crashes thrice a day and a freedomain that is ignored by search engines? Are you looking for free domain with free hosting but dont know where to go? Well then BuddingBloggers is the right thing for you. BuddingBloggers ,as the name suggests is helpful for growing bloggers who dont have a domain of their own. Now you might be wondering what maybe the procedures or criteria for getting a free domain via this service, well the good news is, BuddingBloggers doesnt require you to put some work into it or first complete some sponsored criteria(s) or purchase any service to be liable to recieve a freedomain( as other free domain services do) .Instead ,BuddingBloggers is completely free without any hidden costs, all you gotta do is fill out the application form here : and if you are lucky and enough you might get selected for the sponsorship program.but brfore make sure you have read and understood the program guidelines which you can find here :

Cheers and happy blogging! :)


Free RED beautiful PowerPoint template

Check out our fabulous new PowerPoint templates here :

Download free powerpoint template

Download free powerpoint template

This beautiful free powerpoint template comes ready with two slides with awesome vista-like background.

Just download and make that beautiful impressive presentation

Download Free powerpoint template

Learn how powerpoint template counts in winning a presentation.


How to change cursors on web pages

The “cursor” property of css allows you to change the mouse cursor either for the complete page or for specific elements

The following example illustrates the use of the “cursor” property of css:

//This changes the cursor for the complete page
body {

//This changes the cursor only for the element of class fancy

Cursors are files with extension .cur or .ani (for animated cursor ),there are many sites which give you free animated and non animated cursors for download, even there are freewares which let you create your own custom cursors.
Furthermore, instead of specifying the url of the cursor file you can specify the type/style of cursor which comes inbuilt on most systems.

For example, cursor:pointer will cause the cursor to change to a pointer (as on hyperlinks) and cursor:help will give you a small question mark.

Below is a complete list of the cursor types you can use, move the cursor over a word to see it change
















2019 All rights reserved | Powered by WordPress
Back to top
Theme by