1

I am trying to make an arrow show to the left of the text, but I cant figure out how to format it to make it work.

And my mark up for the rad box is as follows:

<telerik:RadComboBox ID="optionsp" runat="server" HighlightTemplatedItem="true">
     <ItemTemplate>
          <img src="../../../Themes/Images/icons/myimage.gif" />
             <div style="text-align: left; padding-left: 5px"> 
                <asp:Label runat="server" ID="Label1" Text='<%# Eval("Name") %>' > 
                </asp:Label> 
              </div> 
     </ItemTemplate>
  </telerik:RadComboBox>
user710502
  • 11,181
  • 29
  • 106
  • 161

1 Answers1

1

Try with this (added float: left for img and div.

<telerik:RadComboBox ID="optionsp" runat="server" HighlightTemplatedItem="true">
     <ItemTemplate>
          <img src="../../../Themes/Images/icons/arrow2.gif" style="float: left" />
          <div style="text-align: left; padding-left: 5px; float: left"> 
                <asp:Label runat="server" ID="Label1" Text='<%# Eval("Name") %>' > 
                </asp:Label> 
          </div> 
     </ItemTemplate>
</telerik:RadComboBox>

As a side note, avoid inline style definitions as much as possible, you should move them to a css file.

Claudio Redi
  • 67,454
  • 15
  • 130
  • 155
  • Wow great, one last question.. when i added this itemTemplate the hover does not work anymore how can i define a hover on that div? – user710502 Jun 10 '12 at 00:07
  • @user710502: yeah, you'll need to add a css class for the div, and add something like this on your css file `.myclass:hover { /* my styles */}` – Claudio Redi Jun 11 '12 at 14:47