Skip to content
We Get Around Network
Quick StartCameras, platforms, training and more

media query for mobile

Started by RobinLycka · · 4 replies

Last reply

Companies in this topic:Matterport
🔖 Save🔔 Follow

RobinLyckaVeteranOP

Access member
I have a client that´s embedded 3 models on their website, however it´s not mobile responsive.

Does anyone have a sample CSS with a media query for a full screen page that they could share?

DanSmigrodLegend

Elite member
@3DscannUK

WP3D Models WordPress plugin generates responsive design links and embed code so that Matterport Spaces 3D Tours look great on smartphones, tablets, desktops and laptops.

Plus, you benefit from all the SEO ...

For Matterport meets responsive design code, this is a "must read" Matterport User Group Forum thread from two years ago:

Matterport + WordPress (& HTML long titles)


Looks for the great answers by WP3D Models Developer @rpetersn for those that do not use his WordPress plug-in.

Best,

Dan

RobinLyckaVeteran

Access member
@DanSmigrod Thanks, and I´ve recommended WP3D many times on this forum. However, the suggested site isn´t a WP site.

I´ll try this one from the suggested forum thread though, might be what I need;

.matterport-container {
position: relative;
padding-bottom: 56.25%;
height: 0;
overflow: hidden;
max-width: 100%;
margin-bottom: 15px;
}

.matterport-container iframe,
.matterport-container object,
.matterport-container embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}

@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
.matterport-container {
padding-bottom: 100%;
}
}

Then...all you'd have to do is wrap the Matterport IFRAME with this specific <div>:

<div class="matterport-container">
REGULAR-MATTERPORT-IFRAME-EMBED-CODE-HERE
</div>

DanSmigrodLegend

Elite member
@Metroplex360 can you reply to @3DscannUK question above?

Best,

Dan

RobinLyckaVeteran

Access member
I figured it out, just needed a meta tag for the viewport, so here´s me answering my own question :D

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" />

Loading…

Browse the forum →