Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Repeater and HTML tables

Status
Not open for further replies.

vituja123

Programmer
Jun 16, 2005
110
0
0
US
Hi All,

I'm using a data repeater with an HTML table for a desired design look. But the tables seem to indent to the right each time the repeater creates a new table. I'm not sure why? Any help would be appreciated. Thanks.


<asp:repeater id="Repeater1" runat="server">
<ItemTemplate>
<p align="center">
<table border="0" cellspacing="0" cellpadding="0" width="574" bgcolor="#99ccff">
<tr>
<td width="132" align="right" valign="top" bgcolor="#99ccff" colspan="2">
<table border="1" width="100%">
<tr>
<td>
<asp:Image id="Image2" runat="server" Height="136px" Width="122px"></asp:Image></td>
</tr>
</table>
</td>
<td align="left" valign="top" width="439">
<table border="1" width="100%" cellspacing="0" bordercolor="#c0c0c0">
<tr>
<td style="PADDING-LEFT: 8px; BACKGROUND: url(../images/headgradBlue.gif) repeat-x; COLOR: #ffffff"
colspan="2" class="n12" height="21">
<p align="center"><font face="Arial" size="4" color="#000000"><b>
<%# DataBinder.Eval(Container.DataItem, "Name") %>
</b></font>
</p>
</td>
</tr>
<tr>
<td width="85" bgcolor="#99ccff"><font face="Arial" size="2">Position</font></td>
<td bgcolor="#ffffff"><font size="2" face="Arial"><%# DataBinder.Eval(Container.DataItem, "Jobtitle1") %></td>
</tr>
<tr>
<td width="85" bgcolor="#99ccff"><font face="Arial" size="2">Department</font></td>
<td bgcolor="#ffffff"><font size="2" face="Arial"><%# DataBinder.Eval(Container.DataItem, "DepartName") %></font></td>
</tr>
<tr>
<td width="85" bgcolor="#99ccff"><font face="Arial" size="2">Extension</font></td>
<td bgcolor="#ffffff"><font size="2" face="Arial"><%# DataBinder.Eval(Container.DataItem, "EXT") %></font></td>
</tr>
<tr>
<td width="85" bgcolor="#99ccff"><font face="Arial" size="2">Office</font></td>
<td bgcolor="#ffffff"><font size="2" face="Arial"><%# DataBinder.Eval(Container.DataItem, "Office") %></font></td>
</tr>
<tr>
<td width="85" bgcolor="#99ccff"><font face="Arial" size="2">Language</font></td>
<td bgcolor="#ffffff"><font face="Arial" size="2"> </font>
</td>
</tr>
<tr>
<td width="85" bgcolor="#99ccff"><font face="Arial" size="2">Skills</font></td>
<td bgcolor="#ffffff"><font face="Arial" size="2"> </font>
</td>
</tr>
<tr>
<td width="85" valign="top" bgcolor="#99ccff">
<font face="Arial" size="2">Text</font></td>
<td bgcolor="#ffffff">
<font face="Arial" size="2">
<%# DataBinder.Eval(Container.DataItem, "RawTextArea") %>
</font>
</td>
</tr>
</table>
</p>
</ItemTemplate>
</asp:repeater>
 
You shouldn't use tables for page layout; it's not what they were designed for. Try looking into CSS for a more elegant and advised way of web design. Start with this site:



____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top