asp.net - GridView Dropdownlist CSS First letter should be black color and remaining content should be in green color -


how change color of first letter in dropdownlist inside gridview?

  <asp:gridview id="grdavailablerooms" runat="server" >     <columns>       <asp:templatefield headertext="testdropdown">         <itemtemplate>        <asp:dropdownlist id="ddlroomscount" runat="server"    width="120px"cssclass="gridtextingreen" >               <asp:listitem value="0">day</asp:listitem>           <asp:listitem value="1">1 (usd 3510)</asp:listitem>           <asp:listitem value="2">2 (sar 7020)</asp:listitem>            <asp:listitem value="3">3 (usd 8610)</asp:listitem>           <asp:listitem value="4">4 (sar 9050)</asp:listitem>       </asp:dropdownlist>     <columns>    </asp:gridview> 

eg: 1 (usd 3510)- first letter '1' should display in black color , remaining content should display in green color

pls me apply these type of style.

the css-selector first letter of element :first-letter.

for example, make first letter of paragraph red

p:first-letter { color: red; } 

i'm not familiar applying css styles gridview, site seems useful http://atashbahar.com/post/gridview-makeover-using-css.aspx

edit: said, not familiar gridview. however, in example given on webpage provided use

<asp:gridview id="grdavailablerooms" runat="server"       cssclass="mgrid">   

to assign css class grid, , in css guess should like

.mgrid ul li:first-letter { color: red; } 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -