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

repeater format

I want the repeater data to display on about 80% of the row. Currently  the whole row is used for the line separator and data.

Also the line separator is white color and how do i change this color?
<asp:repeater id="Repeater1" runat="server">
	    	<itemtemplate>
	    		
		  
			<div >
				<div style="width:100%"; >
				<br />
				<%#Eval("comment")%>
			</div>
		     
			<div style="width: 50%; float: left;">
			<br />
				<%#Eval("name")%>&nbsp;&nbsp;&nbsp;&nbsp;<%#Eval("date")%>
			</div>	
			<div style="width: 100%">
				
				
			</div>
				</div>
		    </itemtemplate>
		    <separatortemplate>
			<br /><hr />
		    </separatortemplate>
		    <HeaderTemplate>
		 <hr />
		    </HeaderTemplate>
		     <FooterTemplate >
		     <hr /><hr />
		     </FooterTemplate>
	    </asp:repeater>

Open in new window

0
jagguy
Asked:
jagguy
1 Solution
 
cauosCommented:
if you want to make the width of displayed data to 80% of the page;
add div container so it will hold the repeater itself and but the width of that div to 80%
and to change the line separator you can add style to the <hr/> and make the color equal to any color you want
<div style="width:80%">
    <asp:repeater id="Repeater1" runat="server">
                <itemtemplate>
                        
                  
                        <div >
                                <div style="width:100%"; >
                                <br />
                                mohammed
                        </div>
                     
                        <div style="width: 50%; float: left;">
                        <br />
                                darabseh  
                        </div>  
                        <div style="width: 100%">
                                
                                
                        </div>
                                </div>
                    </itemtemplate>
                    <separatortemplate>                    
                        <br /><hr style="color:red"/>
                    </separatortemplate>
                    <HeaderTemplate>
                 <hr />
                    </HeaderTemplate>
                     <FooterTemplate >
                     <hr /><hr />
                     </FooterTemplate>
            </asp:repeater>
    </div>

Open in new window

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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