views:

68

answers:

6

I am upgrading part of a very old website. One of the pages that I own uses controls and dlls that I do not. There is one dll that puts a textbox (input field) on the page. This field is concepually a label but the person chose to use a textbox. Anyways, I can't change the dll.

Is there a way in my asp.net page that uses the dll to say all the textboxes on this page should have a transparent background?

This is the code I have access to. Any changes I make have to be made here.

<asp:Content ID="Content1" ContentPlaceHolderID="bodyContent" Runat="Server">
<style type="text/css">
.heading { color:#007DC3; font-weight:300; font-size:1.5em; line-height:1.22em; margin-bottom:22px; }
</style> 
    <cc1:wizard id="wizCtl" runat="server"></cc1:wizard>
</asp:Content>

Thanks!

like this?

<div style = "input[type='text']{ 
border: none; 
background-color: transparent; 
} 
">
    <cc1:wizard id="wizCtl" runat="server"></cc1:wizard>
</div>

It doesnt seem to work...

Tried this too:

<style input [type='text']{ border: none; background-color: transparent;} >

<cc1:wizard id="wizCtl" runat="server"></cc1:wizard>

</style>
A: 

Is this what you're after:

<style>
  input {border:0;}
</style>
Paul
I don't want anythign to do with the border. I want to set the background to transparent.
kralco626
+1  A: 

Try this

input[type='text']{
border: none;
background-color: transparent;
}
Wolfy87
I can't set their properties. They are in code that I can't change. Is there a way that I can say for all textboxes set background color to transparent?
kralco626
If you stick that in your style tag it should do it.
Wolfy87
If you still want the border then just take 'border: none;' out.
Wolfy87
see edit in my question
kralco626
A: 
input[type='text']
{
    border: none;
    background-color: transparent;
}
A: 

Try this:

In the head part of the doc:

<style type="text/css">

   div#someDiv input[type='text']{ 
   background-color: transparent; 
   } 

</style>

Then wrap your textbox with div and give it an ID

<div id="someDiv">
    <cc1:wizard id="wizCtl" runat="server"></cc1:wizard> 
</div>
drsargen
+1  A: 

I can see your problem. Change your code to

<style type='text/css'>div.tbwrap input[type='text']{ border: none; background-color: transparent;}</style>
<div class='tbwrap'><cc1:wizard id="wizCtl" runat="server"></cc1:wizard></div>

Your style tag was a bit off and I do not thing the 'cc1:wizard' tag should have been within the style tag either.

Wolfy87
HAHA. This worked!... But, It turned all of the textboxes, even the ones that are supposed to be textboxes, to background = transparent. Any chance I can say make all non-editable input fields have background = transparent?
kralco626
It should only do it on text boxes that are wrapped in div.tbwrap though?
Wolfy87
But that wizard generated all of the textboxes. Thats the whole thing, I don't have access to the code it generates, I can't tell it to apply div tags to certin textboxes. So because the wizard is in the div tags so are all of the textboxes...
kralco626
Ah right I see now, sorry I am not familiar with ASP, im a PHP guy ^^ can I see the HTML code for all of the text boxes and what one you want to turn to a label, I need to see if any of them have any defining characteristics.
Wolfy87
unfortunatly there arnt. Ive checked. Ther only think is the client IDs. I tried putting this in my css file: #ctl00$bodyContent$wizCtl$stepContent$AddressEdit1$txtFirstLabel {background-color:Transparent;} thats the client side id of the text box in question.
kralco626
Could you append to your question the html of the text box you wish to apply this to, then I will be able to see what you mean easier and help you out more.
Wolfy87
I think i'm just going to get the client ids of those textboxes and access them that way. Thanks for your help!
kralco626
A: 
<asp:Content ID="Content1" ContentPlaceHolderID="bodyContent" Runat="Server">
<style type="text/css">
.heading { color:#007DC3; font-weight:300; font-size:1.5em; line-height:1.22em; margin-bottom:22px; }
input[type='text']{
    border: none;
    background-color: transparent;
}
</style> 
<cc1:wizard id="wizCtl" runat="server"></cc1:wizard> <!-- if this does transform into a text input, check the page source just to be certain -->
</asp:Content>
GxG