Centering Floating Divs in Docks

2 posts, 0 answers
  1. Paul
    Paul avatar
    11 posts
    Member since:
    Aug 2004

    Posted 21 May 2008 Link to this post

    Hi

    I'm hoping that someone might be able to assist. Basically i'm using the dock control on my home page with 3 coloumn (each column being a dockingzone). the columns on  the LHS and RHS are set to a width of 280px and the middle is set to a width of 100%.

    In one of my docks, for example (see code below) i basically have blocks(panels) in divs which text wrap when moving the doc from eg the middle zone to the RHS or LHS zone, this basically allows the block to align horizontaly when in the middle and verticaly when on RHS or LHS.

    Now what my problem is that i want to be able to center the divs in the dock control even though i using the float : left property as i require it to produce the "text wrap" functionality of each block. So when the dock is in the center column the blocks center correct and don't go to left is this possible?

    <

    div id="divInbox" runat="server" style="float: left; width: 250px;">
    <
    asp:Panel ID="pnlInbox" runat="server" Visible="True">
    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
    <tr>
    <td align="center" style="width: 74px" valign="middle">
    <asp:ImageButton ID="btnInbox" runat="server" ImageUrl="/cop/portal/images/gfx_myInbox.gif"  />
    </
    td>
    <td>
    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
    <tr>
    <td style="height: 25px">
    <asp:LinkButton ID="lnkInbox" runat="server" CssClass="midLink"> Inbox</asp:LinkButton>
    </
    td>
    </tr>
    <tr>
    <td class="homeLabelnotBold">
    View messages you have received.</td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </asp:Panel>
    </
    div>

    <div id="divOutbox" runat="server" style="float: left; width: 250px;">
    <
    asp:Panel ID="pnlOutbox" runat="server" Visible="True">
    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
    <tr>
    <td align="center" style="width: 74px" valign="middle">
    <asp:ImageButton ID="btnOutbox" runat="server" ImageUrl="/cop/portal/images/gfx_myOutbox.gif"  />
    </
    td>
    <
    td>
    <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
    <tr>
    <td style="height: 25px">
    <asp:LinkButton ID="lnkOutbox" runat="server" CssClass="midLink">Outbox</asp:LinkButton>
    </
    td>
    </tr>
    <tr>
    <td class="homeLabelnotBold">
    View messages you have sent to recipients.</td>
    </tr>
    </table>
    </td>
    </tr>
    <
    /table>
    </asp:Panel>
    </
    div>

  2. Sophy
    Admin
    Sophy avatar
    636 posts

    Posted 22 May 2008 Link to this post

    Hi Andrei,

    I would like to ask you clarify a little bit what you mean under being able to center the divs in the dock control.
    Could you please send us a sample page and some screenshots demonstrating what you currently observe when running the page and what is the result you want to achieve so that we can get a better idea of your scenario? Please, note that you will need to open a support ticket in order to have the right to attach files.
    We will be glad to help you.

    Best regards,
    Sophy
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top