To show a specific container only on mobile portrait mode in Webflow, you need to use Webflow's built-in display settings for each breakpoint. These allow you to control which elements appear based on screen size and orientation. Here's how to do it:
div block
) that contains the text and image you want to show only on mobile portrait.If you need even more precision (e.g., hiding on landscape even if the screen width matches mobile), you can add custom embed CSS using the <style>
tag via an Embed component or in the Page Settings > Custom Code.
Use this optional CSS:
<style>
:@media screen and (orientation: portrait) { .portrait-only { display: block !important; } }
@media screen and (orientation: landscape) { .portrait-only { display: none !important; } }
portrait-only
to your container in Webflow.This ensures greater control over orientation even within the same screen size.
Use Webflow’s display settings per breakpoint to show your container only on mobile portrait, and optionally apply custom CSS media queries to hide it in landscape mode explicitly. This lets you prompt users to rotate their phones when on mobile.