Link to home
Start Free TrialLog in
Avatar of gvijay1
gvijay1

asked on

Creating an input field without borders

Experts,

Due to some functional requirements, I need to create an input field but,

1. I want the input field to have no borders.
2. I want to be able to make the background color of the input field blend in with environment around it.

Is there any way to do this. Ie, can I set the input field's properties for borders and background color??

Eventually, I want there to be a field with a value in it, but the user should not know that it is an input field, with the borders absent, and the color blending in with the page.
Avatar of Triskelion
Triskelion
Flag of United States of America image

I have NEVER seen this effect.
I imagine you could make an ActiveX control that hides the borders, but HTML is too "subject to the browser" to handle this effect.
ASKER CERTIFIED SOLUTION
Avatar of tewald
tewald

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Well done, tewald!
Correct - thats about as close as you can get, however, in NN you can change border colors:


<html>
<head>
<title>untitled</title>
<style type="text/css">
input {
    font-family: Arial, sans, Helvetica;
    font-size: 9pt;
    color: #ffffff;
    border: #ffffff 0px;
    background-color: #ffffff;
}
</style>
</head>
<body>
    <input name="styleinput" type="text">
</body>
</html>

Thats about as close as you can get.

see http://www.studio2online.net for other css examples as on the home page.
Avatar of gvijay1
gvijay1

ASKER

Experts,

I tried your suggestion in NN 4.7.0.2.

<html>
<head>
<title>untitled</title>
<style type="text/css">
input {
   font-family: Arial, sans, Helvetica;
   font-size: 9pt;
   color: #ffffff;
   border: #ffffff 0px;
   background-color: #ffffff;
}
</style>
</head>

<body>
     <table>
     <tr>
          <td>
                <input name="styleinput" type="text" value="test">
          </td>
          <td>
               <input name="input" type="text" value="test again">
          </td>
          <td>
               test
          </td>
     </tr>
     </table>

</body>
</html>

However, I do not even see the text that should appear in the text boxes. Do you have a solution for this problem? What is wrong in my code?
<html>
<head>
<title>untitled</title>
<style type="text/css">
input {
  font-family: Arial, sans, Helvetica;
  font-size: 9pt;
  color: #000000;
  border: #ffffff 0px;
  background-color: #ffffff;
}
</style>
</head>

<body>
    <table>
    <tr>
         <td>
               <input name="styleinput" type="text" value="test">
         </td>
         <td>
              <input name="input" type="text" value="test again">
         </td>
         <td>
              test
         </td>
    </tr>
    </table>

</body>
</html>

your color is the same as the bgcolor
Avatar of gvijay1

ASKER

HI mmc98dl1,

I just tried to view the code you sent back in NN, but the values in the text boxes do not show up.

What is still wrong with it?
Avatar of gvijay1

ASKER

HI mmc98dl1,

I just tried to view the code you sent back in NN, but the values in the text boxes do not show up.

What is still wrong with it?
Avatar of gvijay1

ASKER

HI mmc98dl1,

I just tried to view the code you sent back in NN, but the values in the text boxes do not show up.

What is still wrong with it?
I just tried in NN6 and it works, so it must be a varying functionality between versions.

The only other thing is the order of the rules, try putting them in a different order, as NN is very particular.

font-style
font-weight
font-variant
font-size
font-family

is the best order.

If this doesnt work, try

input {
 font-family: Arial, sans, Helvetica;
 font-size: 9pt;
 color: #000000;
 border: #ffffff 0px IMPORTANT;
 background-color: #ffffff;
}
input {
border: #ffffff 0px IMPORTANT;
color: #000000;
background-color: #ffffff;
font-size: 9pt;
font-family: Arial, sans, Helvetica;
}
Avatar of gvijay1

ASKER

Expert,

The example you provided works in IE and NN 6.0, but not in NN 4.7.0.2.

Are you aware of any way this can work in NN 4.7?
Like I say try some variants, in the order in which you have the styles #. Thats the only thing I can think of.

Also bear in mind the world in ever advancing, the number of NN4 browsers (2%) is rapidly disappearing, in favour of NN6 (8%), and IE 5.x(90%) So you might be wasting slightly too much time on this??
Avatar of Eddie Shipman
Hey, Tewald,
  How would you do Checkboxes and Selects (comboboxes)?

I want all inputs to match. I'm thinking of using two
images for the checkboxes, though...
Same thing with the style sheet:

select {
border: #ffffff 0px IMPORTANT;
color: #000000;
background-color: #ffffff;
font-size: 9pt;
font-family: Arial, sans, Helvetica;
}

input {
border: #ffffff 0px IMPORTANT;
color: #000000;
background-color: #ffffff;
font-size: 9pt;
font-family: Arial, sans, Helvetica;
}

textarea {
border: #ffffff 0px IMPORTANT;
color: #000000;
background-color: #ffffff;
font-size: 9pt;
font-family: Arial, sans, Helvetica;
}
No workie on Checkboxes and selects...

What is the meaning of the word IMPORTANT in your CSS?

Is it a keyword?

No workie on Checkboxes and selects...

What is the meaning of the word IMPORTANT in your CSS?

Is it a keyword?

Avatar of gvijay1

ASKER

Thanks mmc98dl1,

all I can say is NN 4.7 sucks!
Netscrap 4.x does not support much styling for inputs.

mmc98dl1,

Your syntax is incorrect.  It is !important not important.  The way you have it, it will be ingnored, and in some browsers the whole declaration will be ignored.

qvijay1,

The declarations given to you by tewald are the correct way to do what you want.  It is not possibile in Netscrape 4.x

Cd&
Cd, as ever, my brain thinks faster than my fingers.

qvijay - indeed netscrap does suck.
Here is the Solution

<HTML>
<HEAD>
<style type="text/css">
     INPUT {
     COLOR: #336699; FONT-FAMILY: verdana, helvetica, trebuchet, arial; FONT-SIZE: 9pt! important; FONT-WEIGHT: normal; TEXT-DECORATION: none; BORDER: white 10px;BACKGROUND-COLOR: moccasin;
}
</style>
<TITLE></TITLE>
</HEAD>
<BODY>
 <input type="text" name="xyz"><br>
 <input type="text" name="dfd">
<P>&nbsp;</P>
</BODY>
</HTML>


You need to change only the background color and border color,Font Color (COLOR property) according to you requirement.



hope this helps...
Akshay
This question has been abandoned.  I will make a recommendation to the
moderators on its resolution in a week or two.  I appreciate any comments
that would help me to make a recommendation.

Cd&
 
It is time to clean this abandoned question up.  

I am putting it on a clean up list for CS.

<recommendation>
points to tewald

</recommendation>

If anyone participating in the Q disagrees with the recommendation,
please leave a comment for the mods.

Cd&
Answer accepted by:

ComTech
Community Support