开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜