Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8796021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:31:30+00:00 2026-06-13T23:31:30+00:00

When using rem as units in css, scaling doesn’t really work in Safari (both

  • 0

When using rem as units in css, scaling doesn’t really work in Safari (both PC and Mac).

Example located at http://jsfiddle.net/L25Pz/3/

Markup:

<div>
    <img src="http://www.google.com/images/srpr/logo3w.png" />
    <p>Lorem ipsum dolor sit amet</p>
</div>

​
CSS:

html { font-size:62.5% }

div { background:url(http://www.google.com/images/srpr/logo3w.png); background-size:275px 95px; background-size:27.5rem 9.5rem; background-repeat:no-repeat; }
img { width:27.5rem; height:9.5rem; }
p { font-size:5rem; }

@media only screen and (max-width: 500px) {
    html { font-size:50%;} /* should render everything * 0.8 */
}

​
​… renders a image in the size of 275px * 95px when the browser window is wider then 600px – in all browsers. Also, when triggering the media query, the image and the background adjusts it’s width and height to 220px * 76px.

BUT – using Safari, the width and height is set to 247px * 75px. Which isn’t * 0.8, it’s something else…

The font-size of the paragraph on the other hand is rendered correctly: 40px when hooked on the query.

Mighty weird if you ask me.
Anyone has a solution?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:31:32+00:00Added an answer on June 13, 2026 at 11:31 pm

    You need to set -webkit-text-size-adjust to none or else webkit will scale up the font size to a readable size:

    @media only screen and (max-width: 500px) {
        html { font-size:50%; -webkit-text-size-adjust:none; }  /* should render everything * 0.8 */  
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using a CSS image sprite, I'm creating an 'interactive' image where hovering over certain
using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
I'm using the code found in this jsbin: http://jsbin.com/asahe5/10/edit There is a function within
I was using 1.6.0_19 jdk and installed 1.6.0_20 jdk.. Glassfish doesn't like that... Here
I want to convert my CSS stylesheet units of measurement from Absolute to Relative.
I am using maven in a project here at work and I've come up
I am using the batch file example below that I got from batch file
I'm using visual studio to program this small TcpServer. It's really specific. The server
Script Example: @SET APPLY_ORA=YES @REM ... IF %APPLY_ORA%==YES ( @ECHO Doing Oracle CALL %SOME_ORACLE_SPECIFIC_COMMAND%
I am writing a little application to download files over http (as, for example,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.