[CLOSED] Div does not take the style.

  1. #1

    [CLOSED] Div does not take the style.

    Hi,

    I have a ViewPort with a panel that contents a comboBox and a logo.

    I need the comboBox to be at the right side and the logo at the left.

    To do that I created one div to each one.

    Also I created an style (#div.dropdownLanguages) for the div that contents the comboBox
    to move it to the right, but it the div does not take the style.

    Could you tell me please what I am doing wrong or if there is a better way to do what I want?

    <ext:ViewPort ID="ViewPort1" runat="server">
        <Body>
            <ext:BorderLayout ID="BorderLayout1" runat="server">
                <North Collapsible="True" Split="True">
                    <ext:Panel ID="Panel1" runat="server" Height="130" Title="North">
                        <Body>
                            
                                <div id="div.dropdownLanguages">
                                    <ext:ComboBox ID="ComboBox1" runat="server" />
                                
    
                                
                                    <asp:Image ID="imgLogo" runat="server" ImageUrl= "App_Themes/ChampWeb/Images/logoAplicacion.png"/>
                                
    
                            
    
                        </Body>
                    </ext:Panel>
    
    // The following is the style for the div
    #div.dropdownLanguages {
        position:absolute;
        left:600px;
    }
  2. #2

    RE: [CLOSED] Div does not take the style.

    This should fix it.

    <table>
        <tr>
            <td><asp:Image ID="imgLogo" runat="server" ImageUrl= "App_Themes/ChampWeb/Images/logoAplicacion.png"/></td>
            <td><ext:ComboBox ID="ComboBox2" runat="server" /></td>
        </tr>
    </table>
    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] Div does not take the style.

    I changed the div by a table, but the style does not work either.

    In design mode appaers at the right according to the style, bu when I run it appears at the left again.

    I putted the dropdown in a different table because it has to be above of the logo, but at the right side.

    I am attaching 2 examples screen.

    <table width="800px" class="dropdownLanguages" >
        <td>
            <ext:ComboBox ID="ComboBox1" runat="server" />
        </td>
    </table>
  4. #4

    RE: [CLOSED] Div does not take the style.

    Hi,

    1. Do not use dot in the id because cannot use such name in the css rules.
    #div.dropdownLanguages
    Such rule is parsed like: element with id="div" and class="dropdownLanguages"

    2. About your code from last post. You missed 'tr' tags

    3. To align combo to the right use float:right css rule
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html>
    <head runat="server">
        <title>Ext.NET Example</title>
        
        <style type="text/css">
            #divdropdownLanguages {
                float:right;
            }
        </style>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
            
            <ext:Viewport ID="ViewPort1" runat="server">
                <Content>
                    <ext:BorderLayout ID="BorderLayout1" runat="server">
                        <North Collapsible="True" Split="True">
                            <ext:Panel ID="Panel1" runat="server" Height="130" Title="North">
                                <Content>
                                    
                                        <div id="divdropdownLanguages" >
                                            <ext:ComboBox ID="ComboBox1" runat="server" />
                                        
    
                                        
                                            <asp:Image ID="imgLogo" runat="server" ImageUrl="App_Themes/ChampWeb/Images/logoAplicacion.png" />
                                        
    
                                    
    
                                </Content>
                            </ext:Panel>
                        </North>
                        <Center>
                            <ext:Panel runat="server" />
                        </Center>
                    </ext:BorderLayout>
                </Content>
            </ext:Viewport>
        </form>
    </body>
    </html>

Similar Threads

  1. [CLOSED] Set style for TextField
    By Digital.Dynamics in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 11, 2012, 2:34 PM
  2. [CLOSED] IE 9 Style Issue
    By logicspeak in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 23, 2011, 5:47 PM
  3. [CLOSED] [1.0] Style Error
    By ljankowski in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Feb 25, 2010, 10:52 AM
  4. Style and Css
    By Yannis in forum 1.x Help
    Replies: 4
    Last Post: Oct 28, 2009, 10:12 AM
  5. [CLOSED] ComboBox style help
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 12, 2009, 7:52 AM

Posting Permissions