Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2230
  • Last Modified:

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.
0
gvijay1
Asked:
gvijay1
  • 7
  • 6
  • 3
  • +5
1 Solution
 
TriskelionCommented:
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.
0
 
tewaldCommented:
You can do this with cascading style sheets, but it only works for IE 5+ - you cannot do it with NN:

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



0
 
TriskelionCommented:
Well done, tewald!
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
mmc98dl1Commented:
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.
0
 
gvijay1Author Commented:
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?
0
 
mmc98dl1Commented:
<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
0
 
gvijay1Author Commented:
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?
0
 
gvijay1Author Commented:
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?
0
 
gvijay1Author Commented:
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?
0
 
mmc98dl1Commented:
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;
}
0
 
mmc98dl1Commented:
input {
border: #ffffff 0px IMPORTANT;
color: #000000;
background-color: #ffffff;
font-size: 9pt;
font-family: Arial, sans, Helvetica;
}
0
 
gvijay1Author Commented:
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?
0
 
mmc98dl1Commented:
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??
0
 
EddieShipmanCommented:
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...
0
 
mmc98dl1Commented:
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;
}
0
 
EddieShipmanCommented:
No workie on Checkboxes and selects...

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

Is it a keyword?

0
 
EddieShipmanCommented:
No workie on Checkboxes and selects...

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

Is it a keyword?

0
 
gvijay1Author Commented:
Thanks mmc98dl1,

all I can say is NN 4.7 sucks!
0
 
COBOLdinosaurCommented:
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&
0
 
mmc98dl1Commented:
Cd, as ever, my brain thinks faster than my fingers.

qvijay - indeed netscrap does suck.
0
 
akshayajmeraCommented:
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
0
 
COBOLdinosaurCommented:
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&
 
0
 
COBOLdinosaurCommented:
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&
0
 
ComTechCommented:
Answer accepted by:

ComTech
Community Support
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 7
  • 6
  • 3
  • +5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now