Results 1 to 4 of 4

Thread: [RESOLVED] Aliggn Literal text

  1. #1

    Thread Starter
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Resolved [RESOLVED] Aliggn Literal text

    Code:
      <asp:Panel ID="PanelReset" runat="server" Visible="true">
            <table style="margin:0 auto">
                <tr>
                    <td>
                         <table style="padding: 1px; border-style:none; background-color:#E0E0E0; border-color:#FF9900;border-width: 2px;">
                            <tr>
                                <td>
                                    <table style="padding: 0px">
                                        <tr>
                                            <td colspan="2" style="text-align: center; color:White; background-color:#FF9933;font-weight:bold;height:20px;white-space:nowrap; vertical-align: middle;">VIS </td>
                                        </tr>
                                        <tr>
                                            <td colspan="0" >&nbsp;</td>
                                        </tr>
                                         <tr>
                                             <td  style="padding: 1px 1px 1px;">
                                                 
                                             </td>
                                            
                                            <td> 
                                             
                                             <div style="display: inline inline-block; padding: 1px 102px 6px; vertical-align:middle;text-align: center !important; width: 270px;">
     <telerik:RadAsyncUpload ID="RadAsyncUpload1" runat="server" MaxFileInputsCount="01" MaxFileSize="3145728" 
         AllowedFileExtensions=".csv,.xls,.xlsx" Height="36px"></telerik:RadAsyncUpload> </div> 
                                            </td>
                                            
                                           
                                        </tr>
                                        <tr>
                                            <td style="text-align: right;">
                                                &nbsp;</td>
                                            <td>
                                                &nbsp;</td>
                                        </tr>
                                       
                                         
                                        <tr>
                                            <td colspan="2" style="color:Red; text-align: center; padding:8px;">
                                                <asp:Literal ID="FailureText1" runat="server" EnableViewState="False"></asp:Literal>
                                            </td>
                                        </tr>
                                   
                                        <tr>
                                            <td colspan="2" style="text-align: center;" class="auto-style1">
                                            
                                                <asp:Button ID="ReturnButton1" runat="server" Text="Εισαγωγή δεδομένων"  Width="143px"  />
                                            </td>
    
                                        </tr>
                                        <tr>
                                            <td colspan="2" >&nbsp;</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                        </td>
                </tr>
            </table>
            
            </asp:Panel>
    Hi , is there a way to align the literal control. I used table-layout:fixed and word-wrap:break-word in the td but it does not seem to work.
    Thanks.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  2. #2

    Thread Starter
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: Aliggn Literal text

    Using a label and doing the below seems to work (not so sure if i must use a default max width but without it, it will just expand)
    Code:
    <td colspan="2" style="color:Red; padding:8px; max-width: 270px;">
                                                <asp:Label ID="FailureText1" runat="server" Text="Label" CssClass="Label1"></asp:Label>
                                            
                                            </td>
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  3. #3

    Thread Starter
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: [RESOLVED] Aliggn Literal text

    OK.

    Although this will create another issue.

    The text will align to the left but what i need to do is align the text to the center if there is enough space for a first line but if I need to go to a second line then align the text to the left.

    Is this possible?

    Thanks.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  4. #4

    Thread Starter
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,597

    Re: [RESOLVED] Aliggn Literal text

    Seems to work
    Code:
    <style type="text/css">
            .Label1 {
                  /*  font-family: Georgia, serif;
                    color: #369;
                    font-size: 36px; */
                    text-align:center;  
                     table-layout:fixed;
                     word-wrap:break-word;
                }
    
       </style>
    .......
    
     <tr>
                                            <td colspan="2" style="color:Red;  padding:8px; max-width: 270px; text-align:center;">
                                                <asp:Label ID="FailureText1" runat="server" Text="Label" CssClass="Label1"></asp:Label>                                        
                                            </td>
                                        </tr>
    Dammit, haven't played with CSS for about a year or so and I have forgotten everything! :P
    Last edited by sapator; Feb 28th, 2017 at 06:19 AM.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width