Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

align datalist item to one line

Posted on 2010-11-09
4
Medium Priority
?
487 Views
Last Modified: 2012-05-10
attached image are datalist with alignment misplaced, trying to align so that the view and create images are aligned with the description and title. align datalist
0
Comment
Question by:doramail05
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 60

Expert Comment

by:HainKurt
ID: 34098756
post aspx code first...
0
 
LVL 60

Expert Comment

by:HainKurt
ID: 34098762
or use

Style="vertical-align: middle;" in all td's...
0
 
LVL 1

Author Comment

by:doramail05
ID: 34098883
here they are :
<tr valign="top">
                                        <td>
                                            <div style="padding-left:50px">
                                            <asp:Datalist ID="dlarticle" runat="server" Height="33px" Width="600px">
                                                            <ItemTemplate>
                                                            <fieldset>
                                                            <table>
                                                                <tr>
                                                                    <td width="20px" background="images/round_rectangletopleft.png"></td>
                                                                    <td></td>
                                                                    <td width="20px" background="images/round_rectangletopright.png"></td>
                                                                </tr>
                                                                <tr>
                                                                    <td width="20px" background="images/round_rectangleleft.png"></td>
                                                                    <td>
                                                                    <div style="float:left; padding-left:10px">
                                                                    
                                                                    <%# DataBinder.Eval(Container.DataItem, "a_categoryname")  %>
                                                                    
                                                                      

                                                                    
                                                                    </div>
                                                                    <div style="padding-left:100px">
                                                                    
                                                                    <%# DataBinder.Eval(Container.DataItem, "a_desc") %>
                                                                    
                                                                    

                                                                    </div>
                                                                    

                                                                    <div style="float:left;padding-left:650px">
                                                                    <HeaderTemplate>
                                                                        View
                                                                    </HeaderTemplate>

                                                                    <ItemTemplate>
                        
                                                                        <asp:LinkButton ID="lbCreatePost" runat="server" 
                                                                                CommandName="CREATEPOST" CssClass="note" CommandArgument='<%#
                                                                                DataBinder.Eval(Container.DataItem, "id") %>'></asp:LinkButton>
                                                                                
                                                                                
                                                                               
                                                                    </ItemTemplate>
                                                                    </div>
                                                                    <div style="float:left;padding-left:720px;">
                                                                    <HeaderTemplate>
                                                                        Create
                                                                    </HeaderTemplate>

                                                                    <ItemTemplate>
                                                                    <asp:LinkButton ID="lbEditPost" runat="server" 
                                                                                CommandName="EDITPOST" CssClass="editnote" CommandArgument='<%#
                                                                                DataBinder.Eval(Container.DataItem, "id") %>'></asp:LinkButton>
                                                                    </ItemTemplate>
                                                                    </div>

                                                                    </td>
                                                                    <td width="20px" background="images/round_rectangleright.png"></td>
                                                                </tr>
                                                                <tr>
                                                                    <td width="20px" background="images/round_rectanglebottomleft.png"></td>
                                                                    <td></td>
                                                                    <td width="20px" background="images/round_rectanglebottomright.png"></td>
                                                                </tr>
                                                            </table>

                                                             </fieldset>
                                                           </ItemTemplate>
                                                        </asp:Datalist>
                                            </div>
                                        </td>
                                    </tr>

Open in new window

0
 
LVL 60

Accepted Solution

by:
HainKurt earned 2000 total points
ID: 34101780
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.datalist.aspx

why do you have multiple ItemTemplate & HeaderTemplate? they should be one...

make it simple and remove all unnecessary div tags... first try to put everything in a simple table like below, and then apply it to your data list...
<table>
	<colgroup>
	<col width=100 valign=top>
	<col width=300 valign=top>
	<col width=50 valign=top>
	<col width=50 valign=top>
	</colgroup>
	<tr>
		<td>Name</td>
		<td>Desc</td>
		<td>View</td>
		<td>Edit</td>
	<tr>
	<tr>
		<td>C#</td>
		<td>C# for dummies</td>
		<td><img src="http://www.psychpress.com.au/psychometric/images/icon_view.gif"></td>
		<td><img src="http://www.weekrent.com/germany/gif/edit.gif"></td>
	<tr>
	<tr>
		<td>VB.Net</td>
		<td>Programming in VB.Net for dummies</td>
		<td><img src="http://www.psychpress.com.au/psychometric/images/icon_view.gif"></td>
		<td><img src="http://www.weekrent.com/germany/gif/edit.gif"></td>
	<tr>
	<tr>
		<td>SQL</td>
		<td>Be SQL guru in 21 Hours</td>
		<td><img src="http://www.psychpress.com.au/psychometric/images/icon_view.gif"></td>
		<td><img src="http://www.weekrent.com/germany/gif/edit.gif"></td>
	<tr>
</table>

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question