• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 508
  • Last Modified:

Changing color in java/jsp

Hi Experts,

I am wondering if there is a way to change color of the output of part of my string. for example I have this:

 <option style="font-size: 36px;"
                                  ; value="<%=applicationName + "," + createdDate%>">
                                 out.print(applicationName + "    Created: "                                                            + createdDate.substring(0, 10)
                                                            + "   Last Updated: "
                                                            + lastUpdated.substring(0, 10));
                  </option>can I have the the color of "created" to be different than the rest?

1 Solution
chaitu chaituCommented:
try this.
out.print(applicationName + "    <font color='red'>Created:</font> "                                                            + createdDate.substring(0, 10)
                                                            + "   Last Updated: "
                                                            + lastUpdated.substring(0, 10));

Open in new window

Michel PlungjanIT ExpertCommented:
Poor suggestion
Font is a deprecated tag and it does not work inside an option

No you cannot change the colour or the font of a word in a normal dropdown.
You will need to use a styled dropdown instead
DESEI-SELBAuthor Commented:
didnt try the styled dropdown. thanks.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now