Font and div placement varies on a mac within a WordPress environment

www.oihanevalbuenaredondo.be

After styling my post titles in CSS using font-family: adobe arabic, I noticed that while they display correctly on my Windows machine, they appear in a basic font on Mac OS, Safari specifically. Why is it that Safari cannot render the title in Adobe Arabic?

This snippet is from my style.css file:

.entry-title {
    font-family: adobe arabic;
    text-align: center;
    letter-spacing: 1px;
    color: #7f7f7f;
    font-size: 28px;
    position: relative;
    margin: 0 0 10px 0;
    padding: 0 60px;
  }

  .entry-title a:hover {
    color: #d9d9d9;
  }
  

I also have another issue related to the positioning of the language option at the top of my page. It appears perfectly aligned on Windows, but on Mac, either the border or the dropdown is misaligned, with one being further to the left.

The code for the border is as follows:

.topbar {
    position: absolute;
    right: 170px;
    top:-8px;
    font-size: 11pt;
    color: #E1BDC3;
    border: 1px dotted #999999;
    border-radius:8px;
    width: 255px;
    height: 48px;
    padding-top: 11px;
    padding-left: 10px;
    z-index: 1000;
  }
  

And this is the CSS for the dropdown:

.widget_polylang {
    position: absolute;
    top: -330px;
    width: 150px;
    right: 20px;
    z-index: 10001;
  }
  

The above code was used to position a widget that contains the dropdown language selector. As a beginner in HTML, I might have made an error in the CSS that works fine on Windows but not on Mac.

Answer №1

To start off, it's important to incorporate a new font into your project using CSS. If you're looking for tips on how to do this correctly, check out the following link:

How can I add a non-standard font to my website?

I highly recommend taking a look at Javier Cadiz's answer, as he suggests using the .woff format which, in my opinion, is the optimal solution.

Answer №2

It's possible that the issue stems from not having the necessary fonts installed on your Mac computer. To address this for web content, you can specify fonts utilizing the @font-face declaration. By incorporating @font-face, you include the required fonts directly within your webpage or through a specified URL for the browser to access.

Answer №3

To begin, it is important to incorporate the font so that it becomes accessible to everyone.

This can be achieved by utilizing either the @font-face method:

@font-face {
    font-family: myFont;
    src: url(path/to/your/font.ttf);
    font-weight: bold;
}
p{font-family: myFont}

Alternatively, you can opt for the import approach in CSS3.

@import url('https://fonts.googleapis.com/css?family=Barrio');
p{
  font-family: 'Barrio', cursive;
}
<p>hello</p>

This implementation allows us to visualize our custom font even if it is not locally installed by users.


The discrepancy in text alignment between OSX and WIN may stem from variations in their respective font rendering engines. More information on this topic can be found here. Unfortunately, there isn't much that can be done to rectify this issue.

Rendering engines play a crucial role in how fonts are interpreted and displayed by different operating systems. Therefore, once both fonts are successfully loaded, minor differences in spacing and sizing may still persist.

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

Use the "webkit-keyframes" exclusively within the specified id

Is there a way to exclusively apply the "webkit-keyframes" within the #progress1 id? I have another progress bar (#progress2) on the same page with a different webkit-keyframes, which is why I need this distinction. #progress1 { background: white; / ...

Looking to incorporate Bootstrap Icons within Semantic UI?

I'm in need of assistance. My current project involves using Semantic UI, but there's a requirement to incorporate Bootstrap icons from . However, I'm facing difficulty copying the svg information directly into the code for the sake of reada ...

Switching the class from "untoggled" items to the selected item in React

Recently, I developed a toggle component known as Accordion. Within this component, I am iterating through an array of objects and displaying them in the following format: {object.map((o) => ( <Accordion key={o.id} title={o.question} className="i ...

Switching Font Family Option for Selection Mat in Angular Material

I'm currently working on changing the font of the options inside mat-select ("In what city were you born", etc). After some experimentation, I found that by setting ViewEncapsulation to none (allowing styles from other files to bleed in), I am able t ...

React-select is failing to align properly with flexbox styling

I'm currently working on customizing my navbar to display both react-selects in a single row. I initially had everything running smoothly with the traditional vanilla select, but integrating the react-select caused my styling to break. Navbar.js impo ...

The image width does not match the width of the table element

Currently, I am working on an HTML newsletter and facing an issue where the width of my image does not match the full width of the td tag, despite both having the same pixel value. The image appears as 180 pixels wide, whereas the td tag is set to be 186 ...

Monitoring user logins based on user identification

How can I effectively monitor the activity of users who have logged into a web application that is managed by an external company? Despite my extensive research efforts, as a non-technical individual, I am struggling to understand how to utilize Google Ana ...

Is it possible to utilize jQuery for dynamically generating a file along with its content?

Here is the HTML snippet I am working on: <ul> <li> Download <a href="#">file1</a> </li> <li> Download <a href="#">file2</a> </li> <li> Download <a href="#">file3</a> </li> ...

"Arranging elements with identical class in a single column but on separate rows using CSS grid - a step-by-step guide

I'm facing an issue with organizing choices and matches in columns using grid CSS. Currently, the match column is overlapping with the choice column. Here is how it is coded at the moment: .grid{ display:grid; grid-template-columns: 1fr 1 ...

What is the best way to create a highlighted navigation bar using Angular 2?

Is there a way to keep the navbar active even after refreshing the page in Angular 2? I am currently using CSS to accomplish this, but the active tab is removed upon page refresh. Any suggestions on how to tackle this? HTML:-- <ul class="nav navbar- ...

I am struggling to move my dropdown list in HTML and CSS

I'm having trouble adjusting the position of a dropdown list on my website using CSS. Can someone help me move the dropdown list to the center? HTML Code: <header> <h1 id="my_cycle_head">MY CYCLE</h1> <ul id= ...

Is it possible to create an HTML link that prevents users from navigating back to the previous page or displaying the previous link in their browsing history?

I've been tasked with creating a button on a client's website that links to another page, like Google, for the purpose of assisting someone seeking help in case of an emergency. The challenge is finding a way to prevent the user from easily retur ...

Connecting components in React using their IDs on the same page

In my project to create a one-page website in React, I have divided it into different components such as a navbar component and an education component. My goal now is to link the navbar to the education section. In my App.js file, I am including the educat ...

Perform an Ajax request to a PHP function using an array as the data payload within the WordPress platform

I have been struggling to send an array from jQuery to a PHP function and have tried various methods without success. I've experimented with $_request, $_post, using JSON.stringify, not using JSON.stringify, but all I get is 'null'. Can anyo ...

Dynamic item addition feature activated by button on contact form

I am looking to create a form that includes the standard name, phone, email fields as well as a dropdown for selecting products and a text box for inputting quantity. The unique aspect is allowing users to add multiple products (dropdown and quantity textb ...

Utilize the entire width of the page by evenly dividing it into different components and considering the occurrence of maximum

I have a code where I inserted a component (product), and I want it to take up the full width of the container. If there is only one component, it should use the full width, and if there are 2 or more, they should evenly distribute across the whole width. ...

Tips for keeping my background image from shrinking when I resize the window?

When I resize the webpage window, my background image shrinks in size. Currently, it is not repeating (which is a step forward), but now I need it to cover the entire screen to avoid showing white space around the background when the window gets smaller. ...

Unique solution: "Using CSS to ensure the overflow document always scrolls to the bottom

Is there a way in CSS to make a div with overflow: scroll always automatically scroll to the bottom along the Y-axis, regardless of its content? For example, like a chat thread that consistently displays the latest message at the bottom. I've encount ...

Is it possible to restore the text to its original state?

Currently, I'm working on creating a simple website for server users to order items. However, I've encountered an issue related to the Navigator text. Here is how it currently appears: Upon inspecting the code below, you'll notice that the ...

The issue of JQuery recursion not properly focusing on a textbox

Can anyone help with a jquery focus issue I'm experiencing? My goal is to address the placeholder problem in IE by focusing on an element and then blurring it to display the placeholder. This functionality is being used in a modal form. Initially, e ...