Bubble Docs
  • Introduction
  • New? Start Here
  • What is Bubble?
  • The Glossary
  • User manual
    • Getting started
      • What is Bubble?
      • Building your first app
        • Planning features
        • Database structure
        • Design and UX
        • eCommerce and payments
          • Shopping cart
          • Checkout page
          • One-time payments
          • Subscriptions
          • Marketplace
      • Creating and managing apps
      • The Bubble editor
        • Tabs and sections
          • Design tab
            • The element tree
            • The property editor
          • Workflow tab
          • Data tab
          • Styles tab
          • Plugins tab
          • Settings tab
            • Application settings
              • Custom headers/body
              • Visual settings
              • Social media sharing
              • Translating your app
              • Email settings
              • Collaboration
            • Custom domain and DNS
          • Logs tab
        • Tools
          • Key features
          • The search tool
          • The Issue Checker
          • The element tree
          • The element property editor
          • The debugger
          • Notes
        • Previewing your app
      • Transitioning to Bubble from...
        • JavaScript
        • HTML and CSS
        • SQL
    • Design
      • Elements
        • The element hierarchy
          • The element tree
        • The page
        • Containers
          • Groups
          • Repeating groups
          • Table elements
          • Popups
          • Floating groups
          • Group focus
        • Visual elements
        • Input forms
          • Text and numbers
          • Dates and time
          • File uploads
          • Selection controls
        • Reusable Elements
      • Styling
        • Color variables
        • Font variables
        • Styles
        • Custom Fonts
      • Responsive design
        • Building responsive pages
        • Legacy articles
          • The Basics (Legacy)
          • Building Responsive Pages (Legacy)
          • Migrating Legacy Pages
          • Tips When Designing (Legacy)
      • Templates
      • The Component Library
      • Importing from Figma
    • Data
      • The database
        • Data types and fields
        • Creating, saving and deleting data
        • Finding data
        • Displaying data
        • Protecting data with privacy rules
        • The database editor
        • Export/import data
          • Exporting data
          • Importing data (CSV)
        • Working with location data
        • Using Algolia
        • Database structure by app type
          • Marketplace Apps
          • Directory & Listings Apps
          • Social Network Apps
          • SaaS Apps
          • Project Management Apps
          • CRM Apps
          • Professional Services Apps
          • On-demand Apps
          • Documentation/ CMS Apps
          • Applicant Tracking System (ATS) Apps
          • Portfolio Apps
          • Gallery Apps
          • Online Store / Ecommerce Apps
          • Blog Apps
          • Messaging App
          • Dashboards
          • Building Block Apps
          • Bubble as a backend
      • Files
      • Images
      • Static data
        • App texts (translations)
        • Option sets
      • Temporary data
        • Custom states
        • URL parameters
      • User accounts
        • Authentication plugins
          • Facebook plugin
          • Fitbit plugin
          • Google plugin
          • Instagram plugin
          • LinkedIn plugin
          • Pinterest plugin
          • Slack plugin
          • Wistia plugin
          • YouTube plugin
        • Cookies set by Bubble
      • Time, dates and time zones
    • Logic
      • The frontend and backend
      • Workflows
        • Events
          • Frontend events
            • Recurring workflows
            • Custom events
          • Backend events
            • Database trigger events
        • Actions
        • API Workflows
      • Dynamic expressions
      • Conditions
      • Navigation
        • Single-page applications (SPA)
        • Multi-page applications
        • Page slugs
    • Workload
      • Understanding workload
        • Activity types
        • The workload calculation
        • Client-side and server-side processing
      • Tracking workload
        • Measuring
          • Using App Metrics
        • Monitoring
          • Workload notifications
          • Infinite recursion protection
      • Optimizing workload
        • Optimization framework
        • Optimization checklist
          • Page load
          • Searches
          • Workflows and actions
          • Backend workflows
        • Agency showcases
          • Minimum Studio
          • Neam
          • Support Dept
    • Security
      • Bubble's security features
      • Planning app security
      • Client-side and server-side
      • Bubble account security
      • App security
      • Page security
      • Database security
      • API security
        • API Connector security
        • Data API security
        • Workflow API security
      • Flusk
        • Overview
        • Flusk plan features
        • Getting started with Flusk
        • Flusk security tools
          • The Issues Explorer
          • Issue details
          • Tools and settings
            • Pages rating
            • Database rating
        • Flusk FAQ
      • Cookies
      • Security checklist
    • Publishing your app
      • Web app
      • Native mobile app
        • Global native mobile settings
        • iOS App Store
        • Google Play Store
        • Publishing FAQ
    • AI
      • Generate apps with AI
        • About AI app generation
      • AI page designer
      • Connect to AI agents
    • Maintenance
      • Collaborators
      • Version control
        • Best practices: Version control
        • Transitioning from the legacy version control
        • Terminology: Version control
        • Version Control (legacy)
      • Commenting
      • Database maintenance
        • Copying the database
        • Restoring database backups
        • Bulk operations
          • Bulk operation methods compared
        • Wiping change history
      • Performance
        • Hard limits
        • Capacity Usage (legacy)
        • Notes on queries
      • SEO
        • Introduction to SEO
        • SEO: App
        • SEO: Page
      • Testing and debugging
        • Introduction to testing and debugging
        • The debugger
        • The server logs
        • Supported browsers
      • API workflow scheduler
    • Integrations
      • API
        • Introduction to APIs
          • What is a RESTful API?
        • The Bubble API
          • Bubble API terminology
          • Authentication
            • How to authenticate
            • No authentication
            • As a User
            • As an admin
          • The Data API
            • Data API Privacy Rules
            • Data API endpoints
            • Data API requests
          • The Workflow API
            • Workflow API privacy rules
            • Workflow API endpoints
            • API workflows
              • Creating API workflows
              • Scheduling API workflows
              • Recursive API workflows
              • API Workflow Scheduler
              • Case: Stripe notifications
        • The API Connector
          • Authentication
          • API Connector security
          • API guides
            • OpenAI
              • Authentication
              • Calls
                • ChatGPT
                  • Chat
            • Google Translate
              • How to setup Google API keys
          • Streaming API
        • API security
        • Plugins that connect to APIs
        • API Glossary
      • Plugins
        • What Plugins Can Do
        • Installing and using Plugins
        • Authentication plugins
        • Special Plugins
      • SQL Database Connector
      • Bubble App Connector
      • WorkOS
        • WorkOS SSO
        • WorkOS API
    • Infrastructure
      • Sub-apps
      • Bubble release tiers
      • Hosting and scaling
        • How Bubble hosting works
        • Scaling with Bubble
        • CDN (Cloudflare)
        • Bubble app names
        • Domain and DNS
      • Compliance
        • GDPR
        • SOC 2 Type II
        • HIPAA
        • Other frameworks and standards
    • Bubble for Enterprise
      • Hosting and infrastructure
        • Dedicated instance
          • The Dedicated editor experience
          • Technical specs
          • Main cluster dependencies
          • Customizable options
          • Migration process
            • Pre-migration
            • During migration
            • Post-migration
      • Security and compliance
        • Single sign-on (SSO)
        • GDPR
        • SOC 2 Type II
        • HIPAA
        • Other frameworks
        • Bubble's security features
      • Admin and collaboration
      • Priority support
      • Billing and Payment Guideline for Dedicated Instances
  • Core Reference
    • Using the core reference
    • Bubble's Interface
      • Design tab
      • Design tab (Legacy)
      • Workflow tab
      • Data tab
      • Styles tab
      • Styles tab (Legacy)
      • Plugins tab
      • Settings tab
      • Logs tab
      • Template tab
      • Toolbar
      • Top and context menu options
      • Deployment and version control
        • Deployment & Version Control Dropdown (legacy)
      • Notes
    • Elements
      • General properties
      • General properties (Legacy)
      • Styling properties
      • Styling Properties (Legacy)
      • Responsive Properties
      • Responsive Properties (Legacy)
      • Conditional formatting
      • States
      • Page Element
        • Page Element (Legacy)
      • Visual Elements
      • Containers
      • Container Layout Types
      • Containers (Legacy)
      • Input Forms
      • Reusable Elements
      • Element Templates (legacy)
    • Workflows
    • Events
      • General events
      • Element events
      • Custom events
      • Recurring event
      • Database trigger event
    • Actions
      • Account
      • Navigation
      • Data (things)
      • Email
      • Element
      • Custom
    • Data
      • Data Sources
      • Operators and comparisons
      • Search
      • Privacy
    • Styles
    • API
      • The Bubble API
        • The Data API
          • Authentication
          • Data API endpoints
          • Data API requests
        • The Workflow API
      • The API Connector
        • Authentication
        • Adding calls
    • Bubble-made Plugins
      • AddtoAny Share Buttons
      • Airtable
      • API Connector
      • Blockspring
      • Box
      • Braintree
      • Bubble App Connector
      • Chart.js
      • Circle Music Player
      • Draggable Elements
      • Dropzone
      • Facebook
      • Fitbit
      • Full Calendar
      • Google
      • Google Analytics
      • Google Optimize
      • Google Places
      • Ionic Elements
      • iTunes
      • Slidebar Menu
      • LinkedIn
      • Localize Translation
      • Mixpanel
      • Mouse & Keyboard Interactions
      • Multiselect Dropdown
      • Progress Bar
      • Rich Text Editor
      • Rich Text Editor (Legacy)
      • Screenshotlayer
      • SelectPDF
      • Slack
      • Segment
      • Slick Slideshow
      • SQL Database Connector
      • Star Rating
      • Stripe
      • Tinder-like Element
      • Twitter
      • YouTube
      • Zapier
    • Application Settings
      • App plan
      • General
      • Domain / email
      • Languages
      • SEO / metatags
      • API
      • Collaboration
      • Sub-apps
      • Versions
  • Account & Marketplace
    • Account and billing
      • Pricing and plans
        • Plans and billing
        • Billing cycle
        • FAQ: Pricing and Workload
      • Account Management
      • Building Apps for Others
      • Selling on the Marketplace
      • Plans & Billing (legacy)
    • Official Bubble Certification
      • Hiring certified developers
    • Building Plugins
      • The Plugin Editor
      • General Settings
      • Updating to Plugin API v4
      • Adding API Connections
      • Building Elements
      • Building Actions
      • Loading Data
      • Publishing and versioning
      • Github Integration
    • Building Templates
    • Application and data ownership
    • Marketplace policies
    • Bug reports
  • Vulnerability Disclosure Policy
  • Beta features
    • About the Beta features section
    • Native mobile apps 🔒
      • Introduction
        • What is a native mobile app?
        • Native mobile vs. web development
        • Differences in native and web elements
        • Native mobile app terminology
      • Building
        • Views and navigation
        • Native mobile actions
        • Components and gestures
        • Device resources
          • Location services
          • Camera/photo library
      • Previewing
      • Publishing
Powered by GitBook
On this page
  • Parent-child relationships
  • Parent settings and element settings
  • Container layout settings
  • Fixed layout
  • Align to parent layout
  • Row layout
  • Column layout
  • Alignment
  • Element layout settings
  • Using the Responsive Viewer
  • Managing Breakpoints
  • Viewing breakpoints
  • Creating a new custom breakpoint
  • Editing breakpoints
  • Removing and deleting breakpoints
  • Other ways to learn

Was this helpful?

  1. User manual
  2. Design
  3. Responsive design

Building responsive pages

Last updated 5 months ago

Was this helpful?

Parent-child relationships

As we explored in the , the design of your app consists of a hierarchy of parent-child relationships. The page itself is the parent of all other elements, and on that page you can place that become the parent of elements inside it.

Containers can also contain containers, making the former the parent of the latter and you can build as many levels of this parent-child relationship as you need. This makes up the basis for the building responsive pages.

In this guide we will illustrate the parent container with a dashed border, as exemplified below:

Parent settings and element settings

Setting up the responsive behavior of a given element is done by mixing the settings on the parent container and the element itself. If the element is placed directly on the page, that page is the parent container, but if you place it into a container element, the settings on that element will affect all its child elements.

The settings on the parent container determines where the elements are positioned relative to the container and each other. For example, they can be positioned vertically (in rows) or horizontally (in columns). The settings on the container is also used to determine the alignment of the overall layout (such as determinging whether a row should start on the left or right side of the container), the total dimensions of all the content and the spacing between rows and columns

The settings on the child elements determines the layout settings to that element in particular: how tall and wide should it be? How much room should the element maintain around and inside of itself (padding and margin) relative to the parent element and sibling elements?

Container layout settings

Each container element (including the page itself) has a Layout setting, and this setting controls the behavior of all the elements inside of it. You can see the different Layouts as a set of rules that tells the children inside of it how to position themselves.

Their position then is based on three factors:

  • The layout setting of the parent container

  • The layout settings on the element itself

  • The settings and position of its sibling elements (the other elements inside of the same container)

There are four types of layouts on the container elements:

  • Fixed

  • Align to Parent

  • Column

  • Row

Fixed layout

Fixed layout lets you move and place an element freely within the parent container and it will position itself on that point. The position is set in an absolute X and Y pixel value, and the size of the element in a W(idth) and H(eight) value.

The position is relative to the parent element: in other words, the element will be positioned exactly X and Y pixels from the top left corner of the parent container.

In the animation below you can see that the button can be positioned freely in the parent element. The red outline on the parent group container indicates that the element will be (remain in this case) a child of that group.

The use of fixed layout can be useful in certain scenarios but can be a bit more challenging to manage on different screen sizes and resolutions.

Parent and child layout settings (fixed layout)

Parent Layout Controls

None

Child Layout Controls

  • Width and Height

Align to parent layout

Align to parent divides the parent element into a nine-cell grid and lets you align child elements to any of the cells. In the illustration below you can see how a rectangular group is divided into upper-left, upper-middle, upper-right and so forth.

If you create a new child element or drag and drop one, it will automatically snap to the nearest cell:

You can also control the position of the element by opening the Property Editor for the child element. Each of the arrows below represent the different cells of the parent container:

Multiple elements

If you want to place multiple elements in the same cell, such as the top left, you may find that the elements overlap. If you want them to align themselves relative to each other, you can place them within a second group and set a different layout for that group.

Parent and child layout settings (align to parent layout)

Parent Layout Controls

None

Child Layout Controls

  • Pin to specific cell

  • Width and Height.

Row layout

Child elements in a row container are aligned one after the other horizontally. The child elements will wrap as the screen is resized or the total width of the elements exceeds the parent containers width.

New child elements drawn inside the container will be added to the end of the list by default but can be re-ordered using the order controls or by dragging and dropping.

Parent and child layout settings (row layout)

Parent Layout Controls

  • Container Alignment

  • Row gap

  • Column gap

Child Layout Controls

  • Vertical Alignment

  • Order Selection

  • Width and Height.

Column layout

Child elements in a column layout will be place on top of each other, regardless of the width they take up:

In the example above, the parent group is set to stretch as the content of it expands. As more and more elements are made visible, the height of the group increases automatically:

Parent and child layout settings (column layout)

Parent Controls

  • Row gap

Child Controls

  • Horizontal Alignment

  • Order Selection

  • Width and Height

Alignment

In row and column layout, you can set the alignment of child elements: where should the row or column start? For example, in a column layout the child elements stack on top of each other: should that stack start at the bottom or at the top of the container element?

Alignment is used both to determine the element's starting position, and how they should be spread out across the parent container.

Element layout settings

In the above section we covered how a container's layout settings affect its child elements. In this part we'll have a look at how the settings on each individual child element is used.

In short the element settings are used to control the behavior of that specific element, as opposed to the container layout settings that affect all child elements. On the element you can set stuff like:

  • How wide should the element be?

    • No restriction

    • Fixed width

    • Minimum/maximum width

    • Stretch with content

  • How tall should the element be?

    • No restrictions

    • Fixed height

    • Minimum/maximum height

    • Stretch with content

  • How should the element be aligned relative to the parent containers layout

  • Should the element collapse its width/height when its hidden?

  • Margin/Padding

As you can see from the settings, this gives you the freedom to control how individual elements behave within the constraints you have set on the parent container.

Using the Responsive Viewer

You will find a tab above the New Element palette that lets you switch between the UI Builder view, where you can modify elements, drag new ones, and delete some, and the Responsive Viewer which lets you manage screen widths, known as breakpoints, and test how your page behaves as the breakpoint changes. In this view, the ruler at the top of the page area defines the current page width. Just click or drag on the ruler to resize the page and see how the page behaves dynamically.

You can also use the preset width icons on the left side of the screen to see how the page looks on mobile in portrait mode, in landscape mode, on a tablet and on a laptop or a desktop.

When you click on an element, the Layout tab in the Property Editor will display the different parameters you can modify to affect its behavior.

Managing Breakpoints

Your Bubble app comes with a Default breakpoint, four preset breakpoints, and the ability to add custom breakpoints. The Default breakpoint is equal to the Default builder width value that is set for that page.

The four presets are:

  • Mobile (320 px)

  • Mobile Landscape (768 px)

  • Tablet (992 px)

  • Desktop (1200 px)

You can use any of your app’s breakpoints to test the page behavior on the Responsive Viewer tab and as data sources to set “Current page width” conditionals on any element.

Viewing breakpoints

All Bubble preset breakpoints are initially added to the page’s toolbar for ease of use. Any other breakpoints are added to the toolbar when the breakpoint is being use as a data source in a conditional on the page.

Breakpoints listed in the breakpoints dropdown are all the presets and custom breakpoints that exist in the app.

Creating a new custom breakpoint

You can create a new custom breakpoint by clicking “Add custom” within the breakpoints dropdown.

Editing breakpoints

You can edit any breakpoint on the toolbar or in the breakpoints dropdown.

Editing a custom breakpoint will edit the data source and update the breakpoint wherever it is referenced in the app.

Editing a preset breakpoint will create a new custom breakpoint and update any reference of the breakpoint to the new custom breakpoint.

Example: Changing the preset breakpoint Mobile from 320 px to 325 px will result in the creation of a custom breakpoint named Mobile (Custom) (325 px) and all references to Mobile will now reference Mobile (Custom) (325 px).

Removing and deleting breakpoints

You can remove any breakpoint from the toolbar, but this does not delete it as an available data source.

You can delete any breakpoint from the breakpoints dropdown. Deleting a breakpoint from the dropdown will remove it from any pages that are using it. This will in turn unlink it from any referenced conditionals and flag an issue in the issue checker to fix those conditionals.

Other ways to learn

Video lessons

We have several video lessons that can help you learn about designing responsive pages.

  • Column and Row layout

You can read more about each individual layout setting in our core reference article about row and column layouts. You'll find the section about here and columns .

You'll find our full Youtube playlist about the responsive editor .

Recorded Webinar: Responsive design in Bubble
Understanding the column container layout
Understanding the row container layout
How to build a sidebar layout
How to build a responsive navigation bar
Dragging and dropping elements in the element tree
Layout and sizing properties in Conditionals
Padding in a container element
Scrolling overflowing content
Gap spacing for row and column layouts
How to use the align to parent container layout
here
section about Bubble elements
In this example, the group that contains all the other elements is the parent and the input fields and button are all children of that group.
The parent container will be highlighted with a dashed line throughout this guide.
The container layout is located in the Layout tab of the Property Editor for the container (parent) element.
Fixed layout lets you set an absolute X and Y position using drag and drop.
The four values highlighted above determine the element's width, height, X position and Y position .
The Align to parent layout lets you align child elements to one of the cells in a nine-cell grid.
Each element added to a row layout will be positioned at the end of the row, and wrap if the total width of the child elements exceeds the width of their parent container.
Elements can be reordered by dragging and dropping or by using the buttons in the Property Editor.
Each element will be placed at the bottom of the column.
For the Fit height to content setting to work as expected, the minimum and maximum height must be set accordingly.
An element's alignment properties determine how the element should be positioned within the constrainta set by its parent container.
The container's layut setting is column, making the child elements stack vertically. But their width is set on an element level, as illustrated in the example above.
rows
here