View Full Version : [CLOSED] Margins not functional on ImageButton

Mar 12, 2013, 2:55 AM
I would like to have my image buttons separated, and for other objects I use the Margins. However, in 2.1, the Margins key word appears to be ignored.

<%@ Page Title="" Language="C#" %>
<%@Import Namespace="System.Net"%>
<%@Import Namespace="System.IO"%>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title />
<meta http-equiv="Content-Language" content="en-us"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<ext:ResourceManager ID="rm1" runat="server" />
<ext:Panel runat="server" Width="185" BodyStyle="background-color: transparent;" CtCls="loginTable" TitleCollapse="true" Border="false" MinButtonWidth="25">
<ext:ImageButton ID="btnLogin" runat="server" ImageUrl="images\buttons\login.png" OverImageUrl="..\images\buttons\loginOver.png" Margins="5 5 5 5" />
<ext:ImageButton ID="btnForgot" runat="server" ImageUrl="images\buttons\forgot.png" OverImageUrl="..\images\buttons\forgotOver.png" Margins="5 5 5 5" />


Mar 12, 2013, 5:56 AM
Hi Steve,

The Margins property is used by Box layouts (HBox and VBox) and Border one.

In your case using an HBox one looks appropriate.

Mar 12, 2013, 4:11 PM
That solves it. Thanks.