Friday, August 14, 2015

Importance Of !important Tag In Blogger

!important-tag

When it comes for blogger,template editing is one of the most useful feature through which you can customize your blog according to you but sometimes template editing becomes a hard work for bloggers due to presence of predefined CSS in the template, so to avoid this problem and apply your CSS without finding the predefined CSS we will use !important Tag.
So Let's Discuss The Features And Importance Of !important tag.



What is !important Tag ?

Generally This tag was developed to replace predefined CSS properties with the new one.Generally When You Apply Two Styles On A Single Class Browser Manually select one of them so to guide browser to apply one one Style !important tag is used.
You already know  that the word in this tag defines what i am explaining to you.


Importance Of !important Tag

As stated above now you must have understood the meaning of !important tag but now i will state the importance of this tag.
We all know the size of our blog's template and the coding done in it really it scares many bloggers!
Also Almost 90% bloggers use custom templates and don't understand it so it becomes really hard for them to edit the template as a result most of bloggers don't even touch the template editing page and their blog design remain same years and years. So now i introduce you a tag which is magical as well as very helpful for bloggers.

How To Use !important Tag-

Let us take a example-

Their is a class named as example-class now suppose our blog template contain this style for it-

.example-class { color: blue; }

Now we thought that we should change the color of the class to green so we applied this Style and save the template-

.example-class { color: green; }

What happened when you re-open your blog? Is the color Changed? Definitely Not! So Now We will use the magical code as stated above which will tell the browser that "Hey Come Here And Take Me First And The Others In Another Time!" through which our new style will be applied. so the final code will look like-

.example-class { color: green !important; }

What Happened Now? Boom ! Our Blog Template Get The Change :) 
So this was a short example to explain importance of !important tag in blogger.
This is the way in which we use !important tag in our sites and blog's.

Read- Awesome Scrolling News Ticker For Blogger!

Example 2-

You must have read our post of new Star highlighter and if not read now to understand this example-

So you must have seen a CSS in which a Style Is Written With !important tag so if i would not use the !important tag in it what will have happened? Definitely there would be no change as now blogger shows a default Pencil Like Icon In Author Comments So To Avoid It I Simply Guide Browser To look On My Style Instead Of Blogger One.
Now you must have understood the importance of !important tag with these examples.

FROM THE AUTHOR:

After reading this post you must have understand the importance of !important tag.
If You Have Any Question's Or Doubts The Feel Free To Ask Them Through Comments. 

No comments:

Post a Comment

PLEASE NOTE:
We have Zero Tolerance to Spam. Spammy Comments and Comments with Links will be deleted immediately upon our review.
For More Rules Read Our Comment Policy