PhP coding help

I have this code here

<input class=“unitPrice” name=“unitPrice<?php echo "1".$i.$j; ?>” type=“text” id=“unitPrice<?php echo "1".$i.$j; ?>” onchange=“calc(<?php echo "1".$i.$j.",".$j.",".$v_iibp; ?>)” value="" size=“10” />

It makes a cell that you can input numbers in for the unitPrice what I am wanting to do is the inside of the cell is white by defalt. I am wanting it LawnGreen 7CFC00 for the inside of the cell.

I have tried editing it and came up with this
<input class=“unitPrice” name=“unitPrice<?php echo "1".$i.$j; ?>” type=“text” id=“unitPrice<?php echo "1".$i.$j; ?>” onchange=“calc(<?php echo "1".$i.$j.",".$j.",".$v_iibp; ?>)” value="" size=“10” />

More of a CSS style there with no luck or help at all its still white inside the cell. Any help would be greatly thanked

This will do what you require:

CSS:

input[type=text] {
	background-color:#7cfc00;
}

You can style individual elements using input[type=text] << this will style all text inputs.
or,
you can use input:not[type=text] << this will style all inputs except text inputs.

Hope that helps,
Red :wink:

Thanks but where in the line of code do I place it. I have tryed before the code and after and every place inbetween

place it in your stylesheet (if you have one)

or in your head section like so:

<style type="text/css" media="screen"> input[type=text] { background-color:#7cfc00; } </style>

Let me know how you get on.
Red :wink:

I do not have a stylesheet :(. I am just wanting two of the like 5 cells highlited in green. cause there Very Important info that is needed

that’s fine, just place this:

<style type="text/css" media="screen"> input[type=text] { background-color:#7cfc00; } </style>

between your tags :wink:

Thank you rock

no worries, happy to help.
Red :wink:

So the finished code would look like this ?? <td align=“center"background-color:#7cfc00;><input name=“unitPrice<?php echo "1".$i.$j; ?>” type=“text” id=“unitPrice<?php echo "1".$i.$j; ?>” onchange=“calc(<?php echo "1".$i.$j.",".$j.",".$v_iibp; ?>)” value=”" size=“10” />

Or something like that ??

remove this bit:
align="center"background-color:#7cfc00; and you should be good :wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service