Jump to content
Sign in to follow this  
bjenn85

Fighting viewport margins and font boosting

Recommended Posts

I am trying to figure out why my page is not loading correctly with viewport. I am using:

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

I have a 750px wide div wrap around my website and to be clear my website shows perfect with this:

<meta name="viewport" content="770,initial-scale=0.8">

The problem there is font boosting on mobile browsers screws up my paragraphs, the first viewport is the only way to solve this. The problem with the first viewport is that it cuts off the right side of the page and there is no margin which makes clicking pagination links and other items hard. See pictures:

 

image.jpg

Above left side margin is fine.

 

image.jpg

 

Here you see the right side margin whitespacing is nonexistent.

 

Can anyone help me with this?

 

Below are my body and wrap CSS

body{background-color:#FFF}
.wrap{width:750px;margin:20px auto;margin-bottom:0}

Share this post


Link to post
Share on other sites

Keep your initial scale to 1 and adjust with an additional media query

 

@media screen and (max-width: 650px) {

.wrap{

width:650px;

}

 

@media screen and (max-width: 480px) {

.wrap{

width:480px;

}

 

And any other adjustments would want.

 

Or do your wrap initally as a %?

.wrap{

width:99%;

}

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.