6 min readRishi

Responsive Canvas Apps with Containers: Stop Using Absolute Positioning

Most canvas apps that feel dated have the same root cause: every control is pinned to hand-tuned X and Y coordinates. That works for one screen size, one browser zoom, and one patient maker. Responsive containers replace pixel choreography with layout rules the app can maintain as screens, devices, and content change.

Absolute positioning is a maintenance trap

X and Y are not a layout strategy. They are coordinates. The moment you need a tablet view, a narrow browser, a hidden panel, or a translated label, absolute positioning starts producing overlap and wasted space. Makers then add formulas to patch individual controls, which makes the screen harder to reason about.

Containers give you a different model. A horizontal container arranges children side by side. A vertical container stacks children. Each child can stretch, fill available space, align, wrap, or keep a fixed size. You stop asking where every control sits and start defining how groups behave.

Old habitContainer replacementWhy it scales
Manual X coordinateHorizontal container orderLayout follows child sequence
Manual Y coordinateVertical container orderSections stack naturally
Fixed width everywhereFill portions and stretchSpace adapts to device width
Hidden controls leave gapsContainer visibility and flexible sizingLayout closes around visible content
Manual tab order fixesLogical control orderAccessibility improves

The goal is not fewer formulas. The goal is formulas at the right level. Put layout logic on containers and section components, not on fifty individual labels.

Turn off scale to fit before judging responsiveness

Responsive design starts in app settings. If Scale to fit is on, the app scales a fixed canvas instead of reflowing layout. That can make a screen look acceptable while still being structurally non-responsive. Turn Scale to fit off for responsive apps, then design for actual width and height changes.

A useful starting point:

Display settings
- Scale to fit: Off
- Lock aspect ratio: Off
- Lock orientation: Off unless the app has a hard device requirement
- Use containers for screen-level layout

Test by resizing the browser. Do not wait for a user with a Surface, phone, or ultrawide monitor to discover the app cannot adapt. Resize constantly while building.

Screen layout should start with one root container

Use a root vertical container on every serious screen. Set it to fill the screen. Put header, body, and footer regions inside it. Then use nested horizontal and vertical containers inside the body. This creates a layout tree that matches how people describe the interface.

For a standard operations screen, the root might be header, main content, and command bar. The main content might be a left navigation container and a right detail container. The detail container might stack summary, form, and related records.

// Root container
Width = App.Width
Height = App.Height
Direction = LayoutDirection.Vertical
Gap = 0

// Header
Height = 64
Width = Parent.Width

// Body
Width = Parent.Width
FlexibleHeight = 1

Name containers by purpose. Use names such as conRoot, conHeader, conBody, conNav, and conDetails. Future makers should understand structure without opening every property.

Fill, stretch, align, and gap replace pixel math

Learn the container properties that matter. Fill controls available space. Stretch makes children match the cross-axis size. Align controls where children sit when there is extra space. Gap creates consistent spacing without spacer rectangles.

These properties are how you express design intent. A navigation pane might have fixed width. A details region should fill remaining width. Buttons in a command bar might align to the end. Cards might use consistent gap instead of manually spaced X values.

PropertyUse it forExample decision
Fill portionsSharing remaining spaceDetails gets the unused width
Flexible widthLetting a child grow horizontallySearch box expands in header
Flexible heightLetting a child grow verticallyGallery fills body height
AlignCross-axis placementButtons align to center
GapConsistent spacingForm fields use standard rhythm
WrapMulti-row responsive groupsCards wrap on narrow screens

Use fixed sizes only where they mean something. A 64 pixel header is a design decision. A 317 pixel form width is usually a symptom.

Breakpoints belong at container boundaries

Use Parent.Width to switch layout at meaningful boundaries. Breakpoints should change section behavior, not micromanage every control. For example, a body container can switch from horizontal to vertical when the screen becomes narrow. A gallery can change template columns. A form can move from two columns to one.

Power Fx makes this straightforward:

// Body container direction
If(
    Parent.Width < 700,
    LayoutDirection.Vertical,
    LayoutDirection.Horizontal
)

// Navigation container width
If(Parent.Width < 700, Parent.Width, 280)

Make mobile a first-class layout, not an afterthought. On narrow widths, stack navigation above content, reduce chrome, and prioritize the task. Do not shrink a desktop layout until it becomes unreadable.

Nested containers make complex screens understandable

Nesting is not overengineering. It is how you keep layout rules local. A header container can manage logo, title, search, and user actions. A form section can manage label and input pairs. A card list can manage wrap and spacing independently from the rest of the screen.

A common pattern for responsive forms is to group fields into rows that can wrap or stack. Keep labels and inputs together so they do not drift apart when space changes.

// Form row container
Direction = If(Parent.Width < 900, LayoutDirection.Vertical, LayoutDirection.Horizontal)
Gap = 16
AlignInContainer = AlignInContainer.Stretch

// Field card
FlexibleWidth = 1
MinWidth = 260

Do not nest blindly. Every container should explain a layout relationship. If it does not group, stack, align, wrap, or size something meaningful, remove it.

Accessibility improves when layout order is logical

Containers help tab order because visual order and control order can match. Absolute positioning often leaves controls in the order they were created, not the order users see them. That is painful for keyboard and screen reader users. With containers, the child order is usually the reading order, and moving a section is less risky.

Also watch focus states, label relationships, and minimum touch target sizes. Responsive design is not only about width. It is about making the app usable when navigation mode, device, font scaling, or zoom changes.

Build one screen the right way, then standardize. Create a root layout pattern, copy it into new screens, and convert old screens incrementally when they need real changes. Stop spending hours nudging controls by two pixels. Containers let canvas apps behave like modern applications, and they make the next change cheaper than the last one.

Keep reading

Newsletter

New posts, straight to your inbox

One email per post. No spam, no tracking pixels, unsubscribe anytime.

Comments

No comments yet. Be the first.