asp.netwebformsasp.net-webcontrol

How can I place one ASP.NET calendar control beside another?


Is there any way to put Two ASP.NET standard calendar controls on Webform, one beside the other? I have been trying for a while to design a WebForm with two calendars controls, but whatever I try they are standing one above the other.

Here is how my aspx looks like:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="JedanDoDruge.aspx.cs" Inherits="JedanDoDruge" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>

        <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
        <asp:Calendar ID="Calendar2" runat="server"></asp:Calendar>

    </div>
    </form>
</body>
</html>

Solution

  • you can arrange them as

    <div>
    <div style="float:right">
    
            <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar>
    </div>
    <div style="float:left">
            <asp:Calendar ID="Calendar2" runat="server"></asp:Calendar>
    <div>
    <div style="clear:both"></div>
        </div>