开发者

How to hide all buttons in IE6 without hiding all inputs in a printing stylesheet?

开发者 https://www.devze.com 2022-12-27 12:11 出处:网络
Whats the easiest method of hiding all buttons but not all inputs (say drop 开发者_JAVA技巧down lists, text input boxes) in CSS that works with IE6. The purpose of this CSS file is for printing (using

Whats the easiest method of hiding all buttons but not all inputs (say drop 开发者_JAVA技巧down lists, text input boxes) in CSS that works with IE6. The purpose of this CSS file is for printing (using the media="Print" tag in the HTML).


You can apply a class to all button inputs.

  <input type="submit" class="hidethis".../>

Then create a css class in the print stylesheet to hide those.

  .hidethis{
     display:none;
  }


Since IE6 doesn't support input[type="button"] syntax, the easiest thing to do is have each button use class="button" and add a .button { display: none; } to the print CSS.

Another option is to use the <button> tag (but I'm not sure that's standard in newer (X)HTML)

0

精彩评论

暂无评论...
验证码 换一张
取 消