how to align repeater control item template content

Shalin Gajjar

i have repeater control. i want text align to left side. this repeater bind up all message threads to table.

for design reference i add this design source:

<table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                        <td style="width: 10px">
                        </td>
                        <td align="left" valign="top">
                            <asp:Repeater ID="Repeater_Inquiry_Messages" runat="server">
                            <ItemTemplate>
                             <div style='display: <%# Container.ItemIndex == 0 ? "none" : "block"  %>'>
                             <table id="ctl00_ContentPlaceHolder1_dl_ticketmsg" cellspacing="0" border="0" style="width:100%;border-collapse:collapse;">
                             <tbody><tr>
        <td style="background-color:#F5F5FF;">
           <table cellpadding="0" cellspacing="0" border="0">
                                        <tbody><tr>
                                            <td class="header">
                                                <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg_ctl00_lbl_msg_no"><%--<%#Container.ItemIndex+1 %>--%><%# Container.ItemIndex.ToString() == "0" ? int.Parse("1") : Container.ItemIndex %></span></td>
                                            <td class="normaltext" valign="bottom">
                                                <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg_ctl00_lbl_tagline">Message By <b><asp:Label ID="lbl_user_t" runat="server" Text='<%# Eval("cargo2").ToString()=="User" ? "You" : Eval("cargo2") %>'></asp:Label></b> 
                                                on <asp:Label ID="lbldatetime" runat="server" Text='<%# DataBinder.Eval(Container.DataItem,"cargo1","{0:ddd, dd MMMM yyyy}")%>'/></span></td>
                                        </tr>
                                        <tr>
                                            <td class="header">
                                                &nbsp;</td>
                                            <td class="normaltext" valign="bottom">
                                                <b>Message :</b><br>
                                                <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg_ctl00_Label1"><asp:Label ID="lbl_inquiry_desc" runat="server" Text='<%#Eval("body")%>'/></span></td>
                                        </tr>
                                         <tr>
                                            <td class="header">
                                                &nbsp;</td>
                                            <td class="normaltext" valign="bottom">
                                               </td>

                                               </tr>
                                               </tbody></table>
        </td>
    </tr>
</tbody></table>
                            </div>
                            </ItemTemplate>
                           <SeparatorTemplate>
                           <table>
                            <tr>
                                <td style="background-color:White;width:5px;">
                                    <span id="Label2"></span>
                                </td></tr>
                                </table>
                            </SeparatorTemplate>
                            </asp:Repeater>
                        </td>
                        <td>
                        </td>
                    </tr>
            </table>

for returned output this gives me: enter image description here how ever i want this <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg_ctl00_lbl_tagline"> and <span id="ctl00_ContentPlaceHolder1_dl_ticketmsg_ctl00_Label1"> to left side not right side.

i want this output as this: enter image description here

Abide Masaraure

Have you tried floating your div contents to the left.

   <div style='float:left;display: <%# Container.ItemIndex == 0 ? "none" : "block"  %>'>
   </div>

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Adding a control to repeater item template programmatically

From Dev

Focus to a particular repeater control item

From Dev

angular js template logic to remove repeater item

From Dev

How to paging using Repeater Control?

From Dev

UWP/WinRT: How to access a control generated by a template from the item it is bound to?

From Dev

How to render a template in Sitecore, if it does not have a content item

From Dev

Repeater: databind server-side ID in item control?

From Dev

css template for image repeater control in asp.net

From Dev

How to format repeater control with ul and li tags

From Dev

how to bind repeater control as message threading

From Dev

How to add html li control dynamically in repeater

From Dev

How to refresh Repeater control from client side

From Dev

How to align my content

From Dev

Is there a way to add a 3rd item template to a repeater

From Dev

Right Align List Item Content in Ionic Framework

From Dev

How to align a flex item to the right?

From Dev

Autolayout - How to align with longest item

From Dev

how to align the arrow in menu item?

From Dev

Autolayout - How to align with longest item

From Dev

How to align specific item into a <li>

From Java

How to align content of a div to the bottom

From Dev

How to align left dl content?

From Dev

How to align an icon to the right of content

From Dev

How to align content to the center of the page?

From Dev

Find row of an item template control in gridview

From Dev

ListView Item Control Template triggers not firing

From Dev

ChangePropertyAction on Image Control in LongListSelector item template

From Dev

ListView Item Control Template triggers not firing

From Dev

change the content of a window control template in WPF

Related Related

  1. 1

    Adding a control to repeater item template programmatically

  2. 2

    Focus to a particular repeater control item

  3. 3

    angular js template logic to remove repeater item

  4. 4

    How to paging using Repeater Control?

  5. 5

    UWP/WinRT: How to access a control generated by a template from the item it is bound to?

  6. 6

    How to render a template in Sitecore, if it does not have a content item

  7. 7

    Repeater: databind server-side ID in item control?

  8. 8

    css template for image repeater control in asp.net

  9. 9

    How to format repeater control with ul and li tags

  10. 10

    how to bind repeater control as message threading

  11. 11

    How to add html li control dynamically in repeater

  12. 12

    How to refresh Repeater control from client side

  13. 13

    How to align my content

  14. 14

    Is there a way to add a 3rd item template to a repeater

  15. 15

    Right Align List Item Content in Ionic Framework

  16. 16

    How to align a flex item to the right?

  17. 17

    Autolayout - How to align with longest item

  18. 18

    how to align the arrow in menu item?

  19. 19

    Autolayout - How to align with longest item

  20. 20

    How to align specific item into a <li>

  21. 21

    How to align content of a div to the bottom

  22. 22

    How to align left dl content?

  23. 23

    How to align an icon to the right of content

  24. 24

    How to align content to the center of the page?

  25. 25

    Find row of an item template control in gridview

  26. 26

    ListView Item Control Template triggers not firing

  27. 27

    ChangePropertyAction on Image Control in LongListSelector item template

  28. 28

    ListView Item Control Template triggers not firing

  29. 29

    change the content of a window control template in WPF

HotTag

Archive