Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

set a color to the inside of <option>

Posted on 2012-03-14
4
232 Views
Last Modified: 2012-03-15
Hi
i have this:in php and i want to make the content in bold and color
<option >$i $unit ($mes) :$days  $day</option>
$unit='unit 1' for example i want it blue and bold
how i can do this please...
any help please
0
Comment
Question by:asaidi
  • 2
4 Comments
 
LVL 40

Assisted Solution

by:gurvinder372
gurvinder372 earned 250 total points
ID: 37723780
0
 
LVL 9

Accepted Solution

by:
alex_code earned 250 total points
ID: 37723955
You must have something likes this:


<select class="my_box"> //give a class to the select box in  order to handle it.
<option value="1">bla</option>
<option value="2">bla2</option>
</select>

If you want the content of the <option> tags e.g. bla bla2 etc to be blue and bold, the only thing you have to set is the color and the font weight of select box class...

.my_box
{
 color:blue;
font-weight:bold;
}
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 37723991
thanks for the points
0
 

Author Comment

by:asaidi
ID: 37724140
you are welcome
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
asp.net input html code have it display the content 2 22
Make Session back to empty 9 30
Head to not include on scroll 4 23
Powershell script does not exit 4 26
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question