blogging@Zed-Axis
CSS Hacks in IE and Other Browsers
Posted on:  Aug 23, 2008

CSS hacks are one of the most popular tricks used in today's web2.0 time. This CSS hacks is mainly use for web pages to view the exact format in all latest and old browsers. The main use behind using these tricks is all browsers take padding - margins differently and to make it equal for all browsers we use CSS Hacks.

First Hack 

<style type="text/css">

.cssstyle{
font-size:12px;
//font-size:13px;
}

</style>

 Now just put ‘//’ in front of css declaration, and a different browser will treat this as comment but Internet Explorer will not treat this as comment and display the font-size as 13px. “

Now the font-size would be 13px in IE and 12px in other browsers.

” All Browsers Hack 

<p><br />
  &lt;div class=&quot;cssstyle&quot;&gt;Now the font-size would be 13px in IE and 12px in other browsers.&lt;/div&gt;</p>
<p>&lt;style type=&quot;text/css&quot;&gt; <br />
  <br />
  #cssstyle {font-weight:bold; font-size:12px; color:black; voice-family:&quot;\&quot;}\&quot;&quot;; voice-family:inherit; color:orange;}<br />
  <br />
  html*#cssstyle {[color:red; color:blue; ]color:purple;}<br />
  <br />
* html #cssstyle {color:pink;}</p>
<p>&lt;/style&gt;</p>

” Now, how to view in all browsers:

Now if your text comes in red color in which you used css class "cssstyle" it means you are using old browser like Opera or Mozilla!

 Now if your text comes in orange color in which you used css class "cssstyle" it means you are using newer Standarized browser like Opera or Mozilla!

Now if your text comes in purple color in which you used css class "cssstyle" it means you are using Internet Explorer 7!

Now if your text comes in pink color in which you used css class "cssstyle" it means you are using Internet Explorer 6!

Now if your text comes in black color in which you used css class "cssstyle" it means you are using Internet Explorer 5!

And Blue color is used for Opera browsers. You can change the properties according to your use.

   AddThis Feed Button
Post your comment
(*) marked fields are mandatory
Name:*  
Email Address:*
Website/Blog URL:
Comments:*

 
Security Code:*
 
 
Note: Comment Moderation has been enabled. Kindly bear with us till the blog administrator approves them to be published.
Follow us on Facebook Follow us on TwitterRSS Feed LinkedIn
 Recent Posts
Need for Channel Sales and Distribution Management System
Growing demand for Secondary Sales Trend Analysis amongst FMCG and similar companies
Why-Your-Health-and-Fitness-Equipments-require-Service-Maintenance?
Must-Know-if-you-are-Buying-a-Mobile-Phone-from-Outside-India
How well are you Leveraging Technology for Collaborating with Your Distribution Partners?
 Tags
 Subscribe
AddThis Feed Button
Zed-Axis BlogSubscribe to Zed-Axis Newsletter
 Categories
 Take our opinion Poll
 Media Updates
 News
 Press Releases
 Zed-Axis@Twitter
 Archives
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016