Reputation: 4324
I have text box and what happens is that the user will click on a button and a string will be generated and displayed in the text box. I need to use a text box as that I can use the "name" attribute for posting, but I do not really need the box, so what I really want to know is how in css can I not display the box? I won't be able to use hidden because then user won't be able to see the text.
Thank you
Upvotes: 0
Views: 2970
Reputation: 1276
You can remove the border and make the background color of the textbox transparent (or to whatever color your page is).
#textBox
{
border: none;
background-color: transparent;
}
Upvotes: 3
Reputation: 1448
<input name="example" style="border: none;">
and if you want to use simple span instead of input box:
<span id="example"> </span>
and JS code to change its contents:
document.getElementById('example').innerHTML = 'test';
Upvotes: 0