tags:

views:

50

answers:

3

I have a vb.net program that has a web browser control, and we all know that it is using the web browser in the computer before internet explorer. And my problem is, it doesn't recognize this css code:

<style type="text/css">
@media print {

    input[type=button] { display: none; }

}

I used that to make the print button invisible when I print the web page. How do I fix this one?Is it possible to add a reference to a portable web browser like firefox, then it will be used by the web browser control in vb.net?

+3  A: 

IE < 7 doesn't know the [attribute=value] selector. You will have to use a class.

Quirksmode compatibility table

Pekka
how do I use a class?
@user225 I edited it, it applies to IE < 7 only. You would have to give the button a class `<input type='button' class='type_button'>` and make that class invisible: `input.type_button { display: none }`
Pekka
A: 

Not sure about getting VB.Net to use a different web browser, but IE 6 doesn’t understand CSS attribute selectors (i.e. [type=button]).

If you can amend the HTML to add a class to the <input> (e.g. <input type="button" class="button">), then you can hide it with this: input.button { display: none; }.

Paul D. Waite
+1  A: 

You'll need to use another method to hide the element, via a classname or ID;

.hideme { display:none }

To which you would add the classname:

<input type="button" name="authcode" value="Foo" class="hideme" />
Jonathan Sampson