Solved

align table in fieldset asp.net

Posted on 2010-11-12
5
1,165 Views
Last Modified: 2012-06-21
trying to align the table in fieldset so the sliderextender comes first and the textbox second in a row.
<tr>

        <td></td>

        <td width="300px" >

        <div style="padding-left:600px;width:300px">

        <fieldset>

         <table width="300px">

           <tr>

             <td colspan="2">

             <asp:Label ID="lblratinghere" runat="server" Text="Reader can rate the article here :" CssClass="datalistcontentfont" />

             </td>

          </tr>

          <tr>

             <td width="200px">

             <cc1:SliderExtender ID="SliderExtender1" BoundControlID="txtScore2" TargetControlID="txtScore" Minimum="1" Maximum="10" runat="server">

              </cc1:SliderExtender>

                 </td>

                 <td width="50px">

                 <asp:TextBox ID="txtScore2"  Width="30" runat="server" />

                 </td>

              </tr>

              <tr>

                  <td>

                  </td>

              <td>

            <asp:TextBox ID="txtScore"  Width="30" runat="server" />

              </td>

           </tr>

          </fieldset>

            </div>

        </table>

       </td>

       <td></td>

</tr>

Open in new window

tableinfieldset.JPG
0
Comment
Question by:doramail05
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:roxviper
ID: 34120708
Hi,

Have you tried to put an style="float:left;" to it?
0
 
LVL 1

Author Comment

by:doramail05
ID: 34120830
tried it always and sometimes it did not align ~~

<div style="float:left;padding-left:600px;width:300px">
                                                     <fieldset>
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 34125685
A DIV inside a table structure is pretty much a guaranteed problem.  Why use it where you have?  And why use the fieldset?  Explain what you are trying to do, it can probably all be done with tables alone.
0
 
LVL 1

Author Comment

by:doramail05
ID: 34125957
that is most can be achieve this time,

the reason div is used is because would like the entire small table to be placed on the right at the bottom of the datalist above.

td style=50 is 11px, and the slideextender is inside, tried to place txtScore2 besides slider extender in the same td but still they are not in the same row.
<div style="float:left;padding-left:600px;width:300px">

       <fieldset>

       <table width="300px">

      <tr>

     <td colspan="2">

     <div style="padding-left:25px">

   <asp:Label ID="lblratinghere" runat="server" Text="Reader can rate the article here :" CssClass="datalistcontentfont" />

        </div>

       </td>

      </tr>

      <tr>

     <td class="style50">

                                                        

                                                       <cc1:SliderExtender ID="SliderExtender1" BoundControlID="txtScore2" TargetControlID="txtScore" Minimum="1" Maximum="10" runat="server">

                                                        </cc1:SliderExtender>

                                                        

     </td>

    <td width="50px">

                                                        <asp:TextBox ID="txtScore2"  Width="30" runat="server" />

                                                         

  </td>

   </tr>

    <tr>

    <td class="style50">

                                                      

    </td>

  <td>

                                                        <asp:TextBox ID="txtScore"  Width="30" runat="server" />

                                                         

   </td>

</tr>

                                                   

                                                    

                                                    

 </fieldset>

</div>

Open in new window

tableinfieldset2.JPG
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 500 total points
ID: 34125971
If you are trying to achieve POSITIONING on the page, you can do that with TABLES OR DIVs, but not with one inside the other.  If you want to keep a table structure, use the table cells to position other tables where you want them, not with a DIV.  Or use ALL DIVs and no tables.  Either will work, but what you have, MIXED TABLE AND DIV will not work.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Scheduled IIS .Net2 AppPools recycle and SQL connection Hangs 33 88
Error in query expression 3 35
Form Processing in PHP 11 31
Server Error 11 47
Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now