- Section
- Troubleshooting: Missing Icons
- Spectra Patterns
- Contact Form 7: Multiple Column Fields
- Contact Form 7: Checkbox / Radio / Acceptance Control
- Unable To Style Contact Form 7
- Tab Index For Multiple Gravity Forms
- Getting Started With Spectra
- Exclude Heading From TOC
- Block Display Conditions
- Importing Starter Templates With Spectra
- Getting Started With Spectra
- Manually Install Spectra Via FTP
- Automatic Beta Updates
- Rollback To Previous Versions
- Load Google Fonts Locally
- Activate Spectra Pro License
- Install Spectra Pro
- Translate Strings With Loco Translate
- Process Refund Requests
- Transparent / Sticky Header
- Change Site Logo
- Change Global Styles
- Disable Title on Posts & Pages
- Transparent / Sticky Header For Single Page / Post
- Change Header & Footer Patterns
- Custom / Google Fonts
- Reset Global Default Styling
- Manually Install Spectra One Via FTP
- Enable / Disable Header & Footer On Specific Pages / Posts
Container V3
Introduction
The Container Block is a powerful layout block that serves as the foundation for creating complex page layouts in WordPress. It goes beyond the standard Group block by offering advanced styling options, pre-built layout variations, background media support, and responsive controls. Use it to create sections, columns, grids, and sophisticated page structures with ease.
How to Add or Use the Block in the Gutenberg Editor
- Adding the Block
- Click the “+” button in the editor to open the block inserter
- Search for “Container” or navigate to the Spectra category
- Click on the Container Block to add it

- Choosing a Layout Variation
- Upon adding, you’ll see a variation picker with 12 pre-built layouts
- Options include: 1-column, 2-column (50-50), 3-column, 4-column, and complex grids
- Select a variation or start with a blank container
- You can change the layout later using the toolbar
- Adding Content to Container
- Click inside the container to add blocks
- Use the “+” button to add any block type
- Containers can be nested for complex layouts
Block Styling Options

Layout Settings
Option | Description | Available Settings |
---|---|---|
HTML Tag | Semantic HTML element | div, header, footer, main, article, section, aside, nav, figure, figcaption, summary, a (link) |
Layout Type Flow | Flex | constrained |
Direction | Flex direction (when using Flex) | Row, Column |
Wrap | Allow items to wrap | On/Off toggle |
Justify Content | Horizontal alignment | Start, Center, End, Space Between, Space Around |
Align Items | Vertical alignment | Start, Center, End, Stretch |
Gap | Space between child elements | 0-100px with responsive controls |
Allow Sizing on Children | Enable individual child sizing | On/Off toggle |
Dimensions
Option | Description | Available Settings |
---|---|---|
Width | Container width | Auto, px, %, vw, em, rem (Responsive) |
Height | Container height | Auto, px, %, vh, em, rem (Responsive) |
Min Width | Minimum width constraint | px, %, vw, em, rem (Responsive) |
Min Height | Minimum height constraint | px, %, vh, em, rem (Responsive) |
Max Width | Maximum width constraint | px, %, vw, em, rem (Responsive) |
Max Height | Maximum height constraint | px, %, vh, em, rem (Responsive) |
Overflow | Content overflow behavior | Visible, Hidden, Auto |
Background Options
Option | Description | Available Settings |
---|---|---|
Background Type | Type of background | Color, Gradient, Image, Video |
Background Color | Solid color background | Color picker with opacity |
Background Gradient | Gradient background | Linear/Radial gradient editor |
Background Image | Image background | Media library upload |
Background Video | Video background | Media library upload (MP4) |
Background Position | Media position | Multiple position presets |
Background Size | Media sizing | Cover, Contain, Auto |
Background Repeat | Media repeat pattern | No-repeat, Repeat, Repeat-X, Repeat-Y |
Background Overlay | Overlay on media | Color with opacity |
Styling
Option | Description | Available Settings |
---|---|---|
Text Color | Default text color for content | Color picker |
Link Color | Link color within container | Color picker |
Border | Container border | Width, Style, Color, Radius (Responsive) |
Box Shadow | Container shadow | Multiple shadow layers |
Padding | Internal spacing | Top, Right, Bottom, Left (Responsive) |
Margin | External spacing | Top, Right, Bottom, Left (Responsive) |
Advanced Features
Option | Description | Available Settings |
---|---|---|
Make Container a Link | Entire container becomes clickable | URL, Target, Rel attributes |
Hover States | Hover effects | Background color/gradient, Text color |
Custom CSS Class | Additional CSS classes | Text field |
Anchor | HTML anchor for linking | Text field |
Available Variations
- One Column – Full-width single column
- Two Columns 50-50 – Equal width columns
- Three Columns – Equal thirds
- Four Columns – Equal quarters
- Two Column Two Row – Grid with stacked columns
- Four Columns 25-75 – Narrow left, wide right
- Three Column Two Row – Complex grid layout
- Four Columns 25-50-25 – Wide center with narrow sides
- Four Columns 75-25 – Wide left, narrow right
- Four Columns 75-25-25-75 – Alternating wide/narrow
- Two Columns 50-50-100 – Two columns with full-width bottom
- Four Columns 25-75-75-25 – Complex alternating layout
Device-Specific Settings
Setting | Desktop | Tablet | Mobile |
---|---|---|---|
Width/Height | ✓ | ✓ | ✓ |
Min/Max Dimensions | ✓ | ✓ | ✓ |
Padding | ✓ | ✓ | ✓ |
Margin | ✓ | ✓ | ✓ |
Gap | ✓ | ✓ | ✓ |
Border | ✓ | ✓ | ✓ |
Typography | ✓ | ✓ | ✓ |
Background Media
Using Image Backgrounds
- Select the Container Block
- In Background settings, choose “Image”
- Upload or select an image from Media Library
- Adjust position, size, and repeat settings
- Add overlay color if needed for text readability
Using Video Backgrounds
- Select the Container Block
- In Background settings, choose “Video”
- Upload MP4 video (recommended: <10MB, no audio)
- Video will autoplay and loop
- Add overlay for better text visibility
Important Settings
Critical Configuration
- HTML Tag Selection – Choose semantic tags for better SEO and accessibility
- Overflow Control – Set to “Hidden” when using border radius with backgrounds
- Responsive Dimensions – Always check mobile appearance
- Background Performance – Optimize images/videos before upload
- Accessibility – Ensure sufficient contrast with background media
Tips and Best Practices
- Consistent Spacing: Use the same padding/margin values across similar containers
- Mobile-First: Design for mobile and enhance for larger screens
- Performance: Compress background media, use WebP for images
- Semantic HTML: Use appropriate tags (header, main, footer, section)
- Accessibility: Test color contrast when using background images
Common Use Cases
- Hero Sections: Full-width container with video background
- Content Sections: Centered container with max-width
- Multi-Column Layouts: Services, features, testimonials
- Call-to-Action Blocks: Container as link with hover effects
- Image/Text Combinations: Two-column layouts with media
Block Toolbar Options

- Change Layout: Switch between layout variations
- Transform: Convert to Group or other compatible blocks
- Alignment: Wide, Full width options
- Drag Handle: Reposition the container
- Options Menu: Additional settings and actions
Troubleshooting
Common Issues
Background video not playing?
- Check file format (MP4 recommended)
- Ensure file size is reasonable (<10MB)
- Verify browser supports video autoplay
Border radius not working with backgrounds?
- Set Overflow to “Hidden” in container settings
- This clips the background to the border shape
Content overflowing container?
- Check Overflow setting (set to Auto for scrollbars)
- Verify height constraints aren’t too restrictive
- Review responsive settings for mobile
Nested containers not working?
- Ensure parent container has proper layout settings
- Check that child containers have appropriate dimensions
- Verify flex/grid settings allow for nesting
Advanced Features
Container as Link

- Change HTML tag to “a” (link)
- Enter URL in the link field
- Set target (new tab) and rel attributes
- Entire container becomes clickable
- Add hover effects for better UX
Link Attributes
- URL: Full URL or relative path
- Target:
_blank
for new tab,_self
for same window - Rel:
nofollow
,noopener
,noreferrer
,sponsored
for SEO/security - Hover States: Background and text color changes on hover
- Accessibility: Proper ARIA attributes automatically added
Hover Effects
Configure different styles for hover state:
- Background color/gradient change
- Text color change
- Smooth transitions
- Works with container links
Available Extensions
Animation Extension

The Container Block supports all Spectra animations:
- Fade effects
- Slide animations
- Zoom effects
- Custom timing and delays
Frequently Asked Questions
Q: What’s the difference between Container and Group blocks?
A: Container offers advanced features like video backgrounds, layout variations, hover states, dimension controls, and can act as a link.
Q: Can I nest containers?
A: Yes! Containers can be nested to create complex layouts. Each container maintains its own settings.
Q: How do I make a full-height section?
A: Set Height to 100vh in the dimension settings. Consider using Min Height for better mobile experience.
Q: Can I use Container for headers/footers?
A: Absolutely! Change the HTML tag to ‘header’ or ‘footer’ for semantic correctness.
Q: Why isn’t my background video showing on mobile?
A: Many mobile browsers restrict video autoplay. Consider using a fallback image.
Compatibility and Requirements
System Requirements
- WordPress: 6.6.0 or higher
- PHP: 8.1 or higher
- Browser: Modern browsers with CSS Grid/Flexbox support
Performance Tips
- Optimize background images (use WebP format)
- Keep video backgrounds under 10MB
- Use lazy loading for off-screen containers
- Minimize nesting depth for better performance
- Enable background overlay conditionally to reduce CSS output
- Consider using CSS Grid over complex nested Flex layouts for better performance
We don't respond to the article feedback, we use it to improve our support content.