Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Berdia 45 posts 67 karma points
    Jan 30, 2012 @ 22:16
    Berdia
    0

    Form tag adds extra space after Footer.

    Hi,

    I've been trying to resolve this problem last couple of days but no luck.

    I am added Form tag in my master page and it added extra space after the footer. It really looks not nice.

    I tried to use (style="display: inline; margin: 0;") but it does not work.

    My code:

    <body class="t">
    <form runat="server" style="display: inline; margin: 0;">
    <div id="page">
    <div align="center" id="header">
    <a href="/"><img src="/images/title_bg3.png" width="840px" height="80px" /></a>

    <div id="mainmenu">
    <umbraco:Macro Alias="umbTopNavigation" runat="server"></umbraco:Macro>
    </div>

    <div class="mainmenucorner">&nbsp;</div>
    </div>

     

    <asp:contentplaceholder id="cp_top" runat="server">

    </asp:contentplaceholder>

    <asp:contentplaceholder id="cp_content" runat="server"></asp:contentplaceholder>

     

    </div>
    <!-- end div#wrapper -->
    </form>
    </body>

    Help is appreciated.

     

  • Rodion Novoselov 694 posts 859 karma points
    Jan 31, 2012 @ 05:50
    Rodion Novoselov
    0

    Hi. What's the reason of use "display: inline" for this form?

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jan 31, 2012 @ 10:23
    Tim
    0

    Hi Berdia,

    By default forms insert a bit of space after themsleves, as they're block level elements. Try adding something like this to your CSS to see if it gets rid of the space:

    form {
      padding: 0;
      margin: 0;
    }
  • Rodion Novoselov 694 posts 859 karma points
    Jan 31, 2012 @ 11:20
    Rodion Novoselov
    0

    Not necessary, Tim, since a block-level element doesn't have to insert any margins or paddings by the standard. Actually it's just completely browser-specific. Rather a simple and convenient way to keep away from such confusions is to make use of any CSS normaliser like e.g. http://necolas.github.com/normalize.css/

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies