0

The following code on a remote web server renders an "invisible" textbox as expected. However the same code on localhost still shows the textbox borders. There are no other stylesheets coming into play (that I am aware of) - and !important has no effect.

<input type="text" style="color:White; border:none; width:1px;" />

I found this discussion which suggests using instead border-left: none, border-right: none etc. This works!! But I'm still posting here because I don't understand why. The page on the server is identical, and being viewed on the same browser (IE8).

Any thoughts?

James
  • 7,343
  • 9
  • 46
  • 82
  • On localhost, are you viewing the page through a server or just opening up the html page in your browser directly? It could be something to do with the headers that the server sends, perhaps a doctype issue. – Jamie Dixon Jul 19 '11 at 09:46

2 Answers2

3

On the remote server, IE8 is in "IE8 Mode", so it works as expected.

For whatever reason, on localhost IE8 is in "IE7 Mode".

Hit F12 to bring up the Developer Tools to verify this.

Possible causes:

thirtydot
  • 224,678
  • 48
  • 389
  • 349
0

This may be a long shot, but if the local host and web server are compiling the code differently it may be worth trying border: 0; instead or border: none; in the styling.

Aaron Lee
  • 1,146
  • 3
  • 14
  • 29
  • [They do the same thing.](http://stackoverflow.com/questions/2922909/should-i-use-border-none-or-border-0) – thirtydot Jul 19 '11 at 10:31