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

iOS devices do not support the add/removeClass function

This code functions properly on desktop browsers, but encounters issues when used on iPhones. Furthermore, the script mentioned below seems to be causing problems specifically on iPhone devices. var $event = ($ua.match(/(iPod|iPhone|iPad)/i)) ? "touchstar ...

Is there a way to make divs expand on top of existing content when hovering over them, in order to avoid needing to scroll through overflow content? I am currently working with

I am working with 9 boxes contained within divs, each box includes data that exceeds the size of the box itself (represented by Some Text repeated for demonstration purposes). I am seeking a solution where hovering over any box will cause it to enlarge and ...

Is there a way to trigger the animation of this text effect only when the mouse is scrolled to that specific section?

Here is a cool typing text effect created using HTML, CSS, and JavaScript. Check out the code below: (function($) { var s, spanizeLetters = { settings: { letters: $('.js-spanize'), }, init: function() { ...

There seems to be a glitch in my PHP comment validation function—it does not seem to be functioning

This form is contained in a PHP file named single.php. <form action="comments.php" method="post" > <?php include(ROOT_PATH . "/app/helpers/formErrors.php"); ?> <input type= "hidden" name="id" value= & ...

Guide on navigating to a specific page with ngx-bootstrap pagination

Is there a way to navigate to a specific page using ngx-bootstrap pagination by entering the page number into an input field? Check out this code snippet: ***Template:*** <div class="row"> <div class="col-xs-12 col-12"> ...

How can I adjust the vertical position of Material-UI Popper element using the popper.js library?

https://i.stack.imgur.com/ZUYa4.png Utilizing a material-ui (v 4.9.5) Popper for a pop-out menu similar to the one shown above has been my recent project. The anchorElement is set as the chosen ListItem on the left side. My goal is to have the Popper alig ...

The white-spaces in Quill JS do not retain their original formatting

I recently integrated Quill JS editor into my website. During testing, I noticed that any text inputted after a white space gets emitted when alerting the content. Below is the HTML code snippet: <div id="postCommentEditor" class="postCo ...

Contrasts between Flash and HTML5

Now that YouTube has transitioned from flash to HTML5, what are the unique features and functionalities of HTML5 that set it apart from flash? I am also curious to learn a more in-depth and intriguing aspect of HTML5 beyond what can be found through a sta ...

Adjust the navigation menu to display or hide as the page is being scrolled

Implementing an offset to display/hide the navigation menu when the page is scrolled 100px. Attempted to modify from lastScroll = 0 to lastScroll = 100 but it did not work as expected. Jquery: Fiddle // Script lastScroll = 0; $(window).on('scroll&ap ...

The "maxlength" attribute does not function with the input type "number" in an HTML textbox

The maxlength attribute does not seem to be functioning properly when using type="number" ...

Tips for preventing an element from scrolling horizontally along with the page body

This is the structure of my HTML: <div class='header-wrapper'> <div class='title'>Title</div> </div> <div class='some-wide-content'> </div> Let's imagine a scenario where the br ...

Exploring the Differences: innerHTML versus appendChild for Loading Scripts

Struggling to dynamically load scripts onto the DOM? function addScript(fileName) { document.body.innerHTML += `<script src='components/${fileName}/${fileName}.js'></script>` } addScript('message-interface') I prefer th ...

Optimizing SCSS Styles for WordPress Websites

Currently, I am in the process of setting up a configuration in Visual Studio Code for a project to adhere to WordPress standards when formatting SCSS code. Despite my efforts so far, I have not encountered any errors and the code is not being formatted up ...

Enhancing the appearance of CSS Tables

I need help with applying a gradient line below each row of data that I am fetching from my database and displaying in a <table>. I've been able to achieve the design using an <hr> element, as shown here: http://jsfiddle.net/ghrw3k8e/. Ho ...

Transitioning from LESS to SASS involves adapting responsive breakpoints

Adapting from Less to Sass has been my current focus. I have defined responsive breakpoints in Less variables: /* Breakpoints */ @break1:~"(max-width: 570px)"; @break2:~"(min-width: 571px) and (max-width: 1002px)"; @break3:~"(min-width: 1003px)"; These ...

In a multidimensional array, locate the key corresponding to the specified value

I am facing an issue with my code that involves an array containing various fruits with product ID and price as keys for different values. While I am able to retrieve the correct price, I am struggling to get the name of the chosen product. For instance, ...

Accessing Facebook through Login with only a button visible

I need help with checking the user's login status on Facebook. I have implemented the code provided by Facebook, but all I see is the login button. How can I determine if the user is already logged in or not? function testAPI() { console.log(&apo ...

Arranging cards in a stack using VueJS

I am currently working with a small vue snippet. Originally, I had v-for and v-if conditions in the snippet, but due to issues reading the array, it is now hardcoded. The current setup produces three cards stacked on top of each other. I am exploring opti ...

Utilize images inputted via an HTML DOM file uploader within p5.js

I'm facing a challenge with allowing users to upload their image file through a DOM file uploader (<input type="file"></input>). Once the image is uploaded, I'm unsure of how to transfer it to JavaScript and process it using p5.js. Ho ...

When attempting to open a popup form by clicking a button, the code fails to function on IE6

Everything seems to be running smoothly on Firefox, however I am encountering issues with Internet Explorer 6. Here is a snippet of the problematic code: document.getElementById('layout').style.opacity = .7 document.getElementById('layout&a ...