Is there a way or CSS Settings to align the same to the right, so that both AutoCompletionList and TextBox end with same right positions.
I have AutoCompleteExtender mapped for a TextBox. When the AutoCompleteList gets displayed, it is postioned to left same as TextBox left position, which is it's default behaviour.
As my AutoCompleteList has wide data, i want the list to right aligned with the textbox.
No style for textbox.
Below is the .aspx
Expand|Select|Wrap|Line Numbers
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head runat="server">
- <title></title>
- <style>
- .completionListElement
- {
- background-color: ivory;
- color: black;
- border: solid 1px gray;
- cursor: pointer;
- font-family: Arial;
- font-size: 10pt;
- width: auto !important;
- }
- .listItem
- {
- }
- .highlightedListItem
- {
- background-color: Gray;
- color: Red;
- }
- .txt
- {
- background-repeat: no-repeat;
- background-position: right;
- }
- </style>
- </head>
- <body>
- <form id="form1" runat="server">
- <cc1:ToolkitScriptManager runat="server" ID="tcm">
- <Services>
- <asp:ServiceReference Path="~/WebService1.asmx" />
- </Services>
- </cc1:ToolkitScriptManager>
- <table width="100%" border="1">
- <tr>
- <td width="50%">
- <asp:Button ID="Button1" runat="server" Text="Button" />
- </td>
- <td width="50%" align="right">
- <asp:TextBox runat="server" ID="txtComments"> </asp:TextBox>
- <cc1:AutoCompleteExtender ID="ace1" runat="server" TargetControlID="txtComments"
- CompletionListCssClass="completionListElement" CompletionListItemCssClass="listItem"
- CompletionListHighlightedItemCssClass="highlightedListItem" ServicePath="~/WebService1.asmx"
- ServiceMethod="HelloWorld" MinimumPrefixLength="3"
- EnableCaching="true" CompletionListElementID="divlist"></cc1:AutoCompleteExtender>
- <div id="divlist" runat="server">
- </div>
- </td>
- </tr>
- </table>
- </form>
- </body>
- </html>