CMS Development

bhillegass
Member

Viewport configuration

Hello!

 

Migrating an existing page into Hubspot. I have copied the HTML over from the pagesource and am really having no issues editing the HTML to work within Hubspot. I am noticing something with the viewport meta tag. It says its configured correctly, but when I view on mobile it still is pinch to zoom format. When I look at the HTML inside the design tool I can only see the viewport on output, but seem to be unable to edit it. When I want to put the desired meta in, I get dinged for having 2 viewport meta tags. 

 

Here's a preview of the site:

 

http://blog.salvagnini.com/panel-bender-promo?hs_preview=prMfmoXh-34485959022

 

Here's the original source: 

 

https://www.salvagnini-america.com/panel-bender-promo

 

Here is the output I'm seeing in HS: 

 

 

Capture.JPG

 

This is what I think it needs to show to resize on mobile properly:

<meta id="view" name="viewport"
 content=", initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0, viewport-fit=cover"/>
0 Upvotes
1 Reply 1
Jake_Lett
Guide | Partner
Guide | Partner

Viewport configuration

Try replacing your meta viewport with the following code. The code you have seems overly complex and below is what I have seen to be the most common usage. Basically this tells the browsers to not scale the page.

 

<meta name="viewport" content="width=device-width, initial-scale=1.0">


Jacob Lett

Freelance HubSpot CMS Developer & Web Designer


bootstrapcreative-horizontal-trim.png

Located in Michigan, USA

Need a custom HubSpot template or theme?