How to write inline conditional css

How to write inline conditional css

We all know what is conditional css and how to write the conditional css. We have written CSS tutorial for writing  inline conditional css easily.

write inline conditional css

Here is few examples about conditional css.

write inline conditional css
write inline conditional css

[css-hacks]

With in style.css file

 a.button_active, a.button_unactive {
 display: inline-block;
 [if lte Gecko 1.8] display: -moz-inline-stack;
 [if lte Konq 3.1] float: left;
 height: 30px;
 [if IE 5.0] margin-top: -1px;
 text-decoration: none;
 outline: none;
 [if IE] text-decoration: expression(hideFocus='true');
 }

When we are use the inline css in document. If in that case we need to use conditional css then there is way

// Following is hack for all IE, including 7. It must go first, or it overrides the following hack
<div style=&quot;width:15px;^width:13px;&quot;>
some dynamic content
</div>
// Following is hack for all IE6 + browsers
<div style=&quot;width:15px;_width:14px;&quot;>
some dynamic content
</div>

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.