Unable to adjust font weight as intended

I'm encountering an issue with getting the lighter font weights to display correctly. Despite having all the necessary font weights installed on my computer, it seems that many fonts do not support the lighter options. What could be causing this inconsistency?

Here is a link to the code snippet.

p{
  font-family: museo sans;
  font-weight: 100;
  font-size: 50px;
}
<div>
  <p>
  hello I am some text
  </p>
</div>

Answer №1

When the font size is set to 600 or higher, it appears bold, which is what was expected. It is possible that if a thinner version of the font were installed, the lower sizes would also work. Without that option, the browser defaults to normal or bold.

According to the Mozilla CSS Reference:

If the exact weight specified is not available, the following guidelines are used to determine the rendered weight:

  • For weights greater than 500, choose the closest darker weight available (or lighter if none).
  • For weights less than 400, select the closest lighter weight available (or darker if none).
  • For a weight of 400, use 500 if available; otherwise follow the guidelines for weights less than 400.
  • For a weight of 500, use 400 if available; otherwise follow the guidelines for weights less than 400.

This implies that for fonts with only normal and bold options, 100-500 represent normal weights while 600-900 signify bold weights.

Edit: It seems that support for lighter weights is also present.

Answer №2

Make sure to verify the font family you are using. Some fonts might only display a noticeable difference in weight up to 500. For example, the font-family: Rubik, sans-serif; may not exhibit significant changes in weight below 500.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Structured chat interface with unchanging top and bottom sections

I'm currently trying to come up with a way to structure my chatbox so that it has a fixed header at the top and a fixed footer at the bottom, while allowing the chatbox body to scroll within those constraints. I've experimented with various appro ...

In Laravel, the text-overflow:ellipsis property fails to function properly when trying to display unescaped data

Encountering an issue with the property text-overflow:ellipsis. The ellipsis at the end of the truncated text is not showing up as expected. To maintain formatting without escaping data in ckeditor, I am using: {!! $treatment->description !!} speci ...

"Revolutionizing the way we navigate: Angular's innovative

Presently, my focus is on incorporating route transitions into my project. I've employed a component that appears on click and triggers the corresponding service function: routeTransition(destination) { if (this.router.url !== destination) { t ...

Modify the hover color of heading 1 only for hyperlink texts

I am attempting to adjust the hover color specifically for text that contains a link. Below is the CSS code I have tried, but it changes the color regardless of whether there are links present or not. h1, h2, h3, h4 { color:#3F3F3F; } h1:hover, h2:hove ...

Choosing a CSS Grid layout

New to web development, I have a design dilemma. Working on a game that teaches students how to multiply, I am unsure about the best way to display the multiplication process. This picture illustrates my issue: Given that I don't know in advance how ...

Interacting with CSS buttons using Selenium

Currently, I am working on a test case in Java where I am using Selenium to record a series of events and then play them back on an application. Here is the code snippet I have: // *The app opens a new window* // Get handle of the main window Stri ...

Ways to adjust the size of div and its elements to fit the window dimensions

When resizing the window, the banner image shrinks while the header and header items remain the same size. However, there is an issue when the header takes up around 30% of the screen in phone view. Here is the CSS code I am using: .headerdiv{ width: ...

Please disable zoom functionality on the website specifically for Android devices

Is there a way to disable the zoom feature on our website specifically for Android phones/devices without affecting iPhones? Perhaps targeting the Chrome browser on Android would be sufficient, but we should also verify the mobile screen size. ...

Reordering Bootstrap 4.1 columns for improved visibility on smaller screens

I'm having trouble adjusting the column order for small screen resolutions in Bootstrap 4.1. I've added the order prefix but nothing seems to be changing. Here is a snippet of my HTML code. Can anyone offer assistance? <div class="container-f ...

Attempting to recreate the dynamic banner featured in the video

Looking to replicate a setup similar to what was demonstrated in the video. I have two div blocks - one with a random image and the other with a video, and I want them to be as flexible and identical as possible to the video layout. How should I go about a ...

Utilize jQuery to hide and then show elements based on text input

Recently, I came across a useful jQuery filter example that sparked my interest. To test it out, I created my live example and shared the code on CodePen (or you can check out the Fiddle if you prefer). One issue I encountered was that after entering text ...

Is there a way to incorporate cell highlighting on IE?

I've implemented a method to highlight selected cells based on the suggestion from jointjs. It surrounds the cell with a 2-pixel red border, which works well in Chrome. However, I need the outline to work in IE as well. Unfortunately, when I reviewed ...

Update the div without altering its contents

Hello, I have a webpage where I am utilizing multiple select lists sourced from 4 different XML files. There is a function that updates one specific div by loading an XML file using the PHP command "$scripts = simplexml_load_file($link);" and then applies ...

Uncovering the hidden treasures of checkbox values using jQuery

I've encountered an issue with a form containing checkboxes. Some values are meant to be true by default, so I've hidden them using the following method: <input type=checkbox name="<%= _key %>" checked="checked" style="display:none" /& ...

Display the Bootstrap dropdown menu on the right-hand side

I am currently working on a dropdown menu and I would like the dropdown items to be displayed on the right side. The functionality is working, but there seems to be an issue where the dropdown menu is not fully visible. The dropdown menu is located within ...

Achieving perfect center alignment for the middle element with flexbox

When it comes to the layout below, my objective is to always keep the middle item centered within the container div. This means that the left and right items should be aligned to the far left and right of the container respectively. The current styling fo ...

Tips for adapting the position of a floating div according to its height and environment

Important Note: The code below utilizes the rubuxa plugin for handling JS sortables. Javascript: function querySelector(expr){return document.querySelector(expr)} var container = querySelector('.ITEST'); var sortable = Sortable.create(container, ...

Recursive PHP function to create a category tree structure

I am facing an issue while trying to create a table of categories through recursive iteration of an array. The table generation works well when the depth increases, however, there seems to be a problem with the HTML output when the depth decreases. Below ...

If I choose a different option from the dropdown list, I would like a textbox to appear

Hey there, I have a list of industries and one of the options is "Other". When a user clicks on "Other", a text box should appear for them to specify. I'm struggling to make this work using Django AJAX. Any help would be appreciated! <div class ...

What are the differences between displaying JSON data on a Flask interface compared to a Django interface

Currently, I am looking for the simplest method to display data on a web interface using either Flask or Django (whichever is easier). I already have some sample JSON objects available. Could anyone provide recommendations on how to achieve this and whic ...