473,385 Members | 1,429 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Can < OPTION > be colored

106 100+
Thats my Question
is it possible in Php to make the option items colored or to highlight some items.
Nov 4 '08 #1
4 1346
Markus
6,050 Expert 4TB
Ok, I will tell you once: don't over do it with your punctuation. A million periods or question marks will only anger others and not get your question answered sooner. So quit it.

Can option be colored? PHP doesn't style an html elements, it can set the style of an element but PHP doesn't do this directly.

Why use PHP to do this? Pointless.

I'll move this over to HTML because either its more suited there, or your question provided no information whatsoever.

--Moved to HTML
Nov 4 '08 #2
jessy
106 100+
Am i asking something that strange ?

hasn't anyone tried before to highlight the items in a combo box !
Nov 5 '08 #3
eWish
971 Expert 512MB
You can. Here is one way.

Expand|Select|Wrap|Line Numbers
  1. <select>
  2.     <option style='color:red; font-weight:700;' value='Red'>Red</option>
  3.     <option style='color:blue; font-weight:700;' value='Blue'>Blue</option>
  4.     <option style='color:green; font-weight:700;' value='Green'>Green</option>
  5.     <option style='color:gold; font-weight:700;' value='Gold'>Gold</option>
  6. </select>
--Kevin
Nov 5 '08 #4
jessy
106 100+
Can't Thank U Enough
Nov 5 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
1
by: Ang Talunin | last post by:
Hey, I wondering if it's possible to retrieve all the <option>-fields from a <select> when posting a <form> to a php file Example: I've got a form like this: <form action = phpfile.php...
6
by: Bonge Boo! | last post by:
This has got to be obvious, but I can't make it work. I have a form called with 3 pull down menus. They are linked to a database which generates the values for the <SELECT? Pull-downs. Lets...
4
by: He Shiming | last post by:
Hi, I'm wondering how can I use <DIV> to mimic a <TABLE>. In a bare <TABLE> without a width attribute, the width of the table get dynamically expanded according to the content. However, <DIV>...
3
by: shaun roe | last post by:
a follow up with new problems from my previous post: I have xml encoded in a string with elements like &lt;myElement/&gt; e.g <codeFragment> &lt;myElement&gt;some text&lt;/myElement&gt; </codeFragment> I...
6
by: joseph.lindley | last post by:
Forgive me for I am a bit of a web-dev novice - but I'm not doing too bad. I'm currently working with a bit of javascript to dynamically add <option>s into a select box. My code currently works...
28
by: Kent Feiler | last post by:
1. Here's some html from a W3C recommendations page. <P>aaaaaaaaa<DIV>bbbbbbbbb</DIV><DIV>cccccccc<P>dddddddd</DIV> 2.Although I didn't think it would make any difference, I tried it with the...
14
by: The Natural Philosopher | last post by:
This is a nasty one and I can't see my way out of it. I have a bunch of select statements in a form, and each select statement has an onchange="do_something(this)" in it, and this works...
1
Ali Rizwan
by: Ali Rizwan | last post by:
>>> Colored Vista Progress Bar <<< It will turned to red after 75% Its very Cool Good Luck ALI
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.