This topic is locked

How to change the background color of a dropdown on PHPR 6?

12/18/2011 2:25:24 PM
PHPRunner General questions
N
Nelson author

Hi,
I wonder where can I reach the file where I can change the bacground color of some lines on this category dropdowns?
I also want to change the value of the colored lines on the dropdowns to 'none' value...could you please tell me where is the file

where the categories are on?
Pic one is what the dropdown looks now!


In pic two is what we hope the dropdown would look like after the change


And I have this script, I hope it will be integrated in the file!

<style type="text/css">

select.dropdown {

color: white;

}
select.dropdown option {

color: white;

background-color: yellow;

}

</style>

</head>
<body>

<select class="dropdown">

<option value="1">1</option>

<option value="2">2</option>

<option value="3">3</option>

</select>

</body>
Sergey Kornilov admin 12/19/2011

You can do this using Javascript API. Here is the example of performing a similar task:

http://xlinesoft.com/phprunner/docs/how_to_change_font_in_edit_con.htm

N
Nelson author 12/19/2011



You can do this using Javascript API. Here is the example of performing a similar task:

http://xlinesoft.com/phprunner/docs/how_to_change_font_in_edit_con.htm


Hi Sergey,
I played alot with the codes and couldn't figure out how to change the background color of a specific word

on a dropdown...however I could change the background color of the whole dropdown with a code below on the 'jscript onload event':

$.each($("select"),function(i,e){

$(this).css('background', '#dcdcc3');

});


how do I change the background color of a specific word like: -- VEHICLES -- ?
Thanks

Sergey Kornilov admin 12/20/2011

Nelson,
I don't think "standard" dropdown box provides this sort of functionality. You need to use some sort of custom control that allows you to color entries.

N
Nelson author 12/20/2011

Thanks,
I'll give it a try