html - Question about CSS in Internet Explorer -


I have an idea that I can imagine.

Put me in a CSS file:

  height: 50px;   

If the browser is Internet Explorer, and

  height: 45px;   

If the browser is Chrome or Firefox.

How can I do this?

A special tag can be used as the following:

  & lt; Style type = "text / css" media = "screen" & gt; . Your tag {weight: 45px; } / * Common Browsers * / & lt; / Style & gt; & Lt ;! - [if IE] & gt; & Lt; Style type = "text / css" media = "screen" & gt; / * IE * /. Your tag {weight: 50px; } & Lt; / Style & gt; & Lt; [Endif] - & gt;   

NB: IE understands the weight of the element with boundaries, when other browsers do not.

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -