Change size of text with different resolution

Related searches

I have a background that is changing with a different resolution of browser. That is working perfectly. Then there is a text that is typed in js. I want to change the size of that text with different resolutions of browser too.

Do you know how to do that?

Normal size:

Small size:

.wrap-hero-content {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.hero-content {
  position: absolute;
  text-align: center;
  min-width: 110px;
  left: 50%;
  top: 58%;
  padding: 65px;
  outline-offset: 8px;
  -webkit-transform: translateX(-50%) translateY(-50%);
  transform: translateX(-50%) translateY(-50%);
}
<div class="wrap-hero-content">
  <div class="hero-content">
    <span class="typed"></span>
  </div>
</div>

You can do this easily with css (you can play around with the min-width and font-sizes to suit your needs:

 // default for less than 800px width
    .hero-content .typed {
         font-size:10px;
    }

@media (min-width: 800px) {
    .hero-content .typed {
         font-size:12px;
    }
}

@media (min-width: 1024px) {
    .hero-content .typed {
         font-size:14px;
    }
}

Change the screen resolution and make text and icons bigger in , This can be done right from the Display Settings window. Click or tap the drop-down menu for "Change the size of text, apps, and other items." The menu contains a few options calculated by Windows 10 to match your screen resolution (the lower the resolution, the fewer options). Try clicking or tapping on the options. Next, in Change the size of text, apps, and other items, select an option. Typically, it's best to choose the one that's marked (Recommended) . If that doesn't solve your problem, try changing the screen resolution.

You will have to use something like this:

@media screen and (max-width : 320px)
{
  .your_text
  {
    font:10px;
  }
}
@media screen and (max-width : 1204px)
{
  .your_text
  {
    font:16px;
  }
}

Change the size of text in Windows 10, To change your display in Windows 10, select Start > Settings > Ease of Access > Display. To make only the text on your screen larger, adjust the� Text size with different resolution. Ask Question Asked 7 years, 10 months ago. Active 1 year, 9 months ago. size and resolution are two different things. A small

create a special font size for all devices

$html-font-size-lg: 16px;
$html-font-size-md: 15px;
$html-font-size-sm: 14px;
$html-font-size-xs: 13px;

$paragraph-font-size-lg: 18px;
$paragraph-font-size-md: 16px;
$paragraph-font-size-sm: 14px;
$paragraph-font-size-xs: 12px;

html {

    font-size: $html-font-size-lg;
    line-height: 23px;

    @media (max-width: 1024px) {
        font-size: $html-font-size-md;
    }

    @media (max-width: 640px) {
        font-size: $html-font-size-sm;
    }

    @media (max-width: 480px) {
        font-size: $html-font-size-xs;
    }

}

or Use em or rem for responsive font size Em is a scalable unit equal to the current font size in the document. If you haven’t set font size by default, then the browser will set it for you. Browser default font size would typically be 16px. So 1em equals 16px by default. If you set font size for document 14px, 1em would equal 14px, 2em would equal 28px, 0.5em would equal 7px, etc. Recommended units are em and rem due their scalability and their mobile device friendly nature.

// body font size
$browser-context: 16;

// function to convert px to em
@function em($pixels, $context: $browser-context) {
    @return #{$pixels/$context}em
}

html {
    line-height: 1.2;
    font-size: em(16);
}

h1 {
    // 72px
    font-size: em(72);
}

h2 {
    // 24px
    font-size: em(24);
}

THIS IS BEST PRACTICES FOR RESPONSIVE TYPOGRAPHY.

How to adjust the screen resolution or desktop size, In Windows 10 � Open Start, select Settings > System > Display. � Under Scale and layout, check the setting under Change the size of text, apps, and other items . The “Display” tab on the left is selected by default. On the right, under the “Make Text Bigger” section, slide the bar until the sample text is easy for you to read and then click “Apply.” Windows immediately scales up the size of all text. How to Make Everything Bigger

Change screen resolution and text size in Windows, In Windows 7, 8 and 8.1, click Make text and other items larger or smaller in the Screen Resolution window (right-click on Desktop and select Screen resolution). In Windows Vista, click Adjust font size (DPI) in the Personalization window (right-click on Desktop and select Personalize). How to Make Font Size Bigger or Smaller on Your Screen Keyboard Shortcut for Zoom. Some applications let you adjust the zoom level with your keyboard. This works in web Windows Zoom Settings. Another way to change the font size on your Windows computer is through settings that affect the Mac

Dual monitors on Windows, I solved this issue by changing the "apparent DPI" (and thus text size) of the use the Thinkpad screen at a lower resolution to increase the apparent font size. Text auto-sizing is designed to scale the text to the defined max point size to fit the text container or RectTransform in this case. Text Auto-sizing also needs to test various point sizes in order to determine what the optimum point size is for a given text container and as such is not as efficient as just a plain text object with a fixed size.

Despite have an identical horizontal resolution, images, text, and icons will be physically larger on the laptop so they can roughly match the same elements on the desktop screen. You may need to log out and log back in to apply the settings across all of Windows. If you’d like more precise options, you can click the “Custom scaling” link.

Comments
  • Hi, first of all is it nesseccary that your text is written in js? If you need different text on different devices work with @media querys in css. And hide them or show them in different resolutions? developer.mozilla.org/de/docs/Web/CSS/Media_Queries/… is it neccessary than work with javascript window.onresize = function(event) { ... };
  • Read about Responsive Font Size
  • That text is written in js because there are three different sentences that are writting and deleting themselve.
  • Thanks, but if my text is writting in js three different senteces. Then how could I define that?
  • This will change the text size of the div class where you are writing the text. Doesn't really matter if you add it from javascript or not