Bootstrap list displays differently in Safari browser compared to other browsers

I've created a basic unordered list using Bootstrap 4:

<ul>
 <li>line 1</li>
 <li>line 2</li>
 <li>line 3</li>
 <li>line 4</li>
 <li>line 5</li>
</ul>

and I've applied some custom CSS to style it:

ul, ol {
  padding-left: 1rem;
}

li {
  margin-bottom: 1rem;
}

However, the list appears differently in Firefox and Safari.

Firefox https://i.sstatic.net/JLCEi.png

Safari https://i.sstatic.net/Qm70b.png

After some investigation, I discovered that Bootstrap uses the ::marker pseudo element instead of ::before. Is there a way to modify this so that it displays more consistently across different browsers like Safari?

Answer №1

Perhaps the issue at hand is not related to Bootstrap. I have come across a few potential solutions that might be helpful:

  1. If the problem lies with charset, consider adding @charset "UTF-8"; at the beginning of your CSS code.

  2. Many developers utilize reset CSS to eliminate default paddings and margins for better browser consistency. You can access a simple reset CSS here.

  3. To create custom bullet points using CSS, apply list-style: none; to your ul element and then use ::before on the li element to add a bullet.

Answer №2

It is possible that the issue is linked to a browser glitch specific to Safari. I came across a relevant resource at https://getbootstrap.com/docs/3.4/browser-bugs/, which discusses problems with rem units in WebKit bug #156684.

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

Show the elements of an array within a div when a button is clicked, utilizing pure vanilla JavaScript

I'm looking for help with printing the elements of an array onto a div element. Can anyone provide some guidance? var myArray=["stone","paper","scissors"] <button onclick="printnumbers()"></button> <div id="result"> </div> ...

Ensuring the validity of float and non-empty values in JavaScript

Embarking on the journey of web development, I'm delving into basic applications. My current project involves creating a straightforward webpage to add two numbers and implementing preliminary validations - ensuring that the input fields are not left ...

The table is overflowing its parent element by exceeding 100% width. How can this issue be resolved using only CSS?

My root div has a width of 100% and I need to ensure that all children do not overlap (overflow:hidden) or exceed the 100% width. While this works well with inner <div>s, using <table>s often causes the table to extend beyond the parent 100% d ...

Boxes rest gently against each other

Hello everyone! I'm currently working on a website for one of my college projects, and I could really use some assistance. I seem to have two boxes touching each other when I actually want a small gap between them. Any help or suggestions would be gre ...

traverse through numerous URLs using rvest in R

Looking to scrape data from a series of 9 URLs. Each URL has an offset value that changes as you navigate through pages. The goal is to loop through each page, scrape the table data, and stack it together using rbind in sequence. Lapply is preferred over ...

What is the best way to save and retrieve JavaScript variables on a Blogger page that includes a poll, without needing to host the blog on my own server?

I want to ensure that the valuable feedback provided by users in the poll is not lost. Although the code is a work in progress, the basic concept is there. I did my research before posting this question to avoid redundancy. <script type="text/javas ...

Tips for arranging columns and rows in a mat-dialog box

In my Angular project, I am working on a mat dialog box and trying to achieve a layout with 1 row at the top and 3 rows at the bottom, similar to the image below. However, I am facing issues in making it work properly. Additionally, I want to hide the hori ...

The autocomplete feature in Google Maps is not functioning properly when used within a modal

I've integrated the Google Maps API to enable autocomplete address functionality for an input box on my page. However, I'm encountering an issue where everything works fine on the page itself, but it doesn't work when the input box is placed ...

Tips for creating a responsive div that contains both an image and description, including automatically resizing the image to fit the

#content { background-color: #ACAE4C; float: right; display: inline-block; padding: 0; } <div id="content"> <div class="pic"></div> <div class="desc"></div> </div> I need assistan ...

Retrieve a class attribute that is only visible when a checkbox is checked in Ruby using Selenium

One of my tags has the following structure: <ul id="genres-bar" > After a user selects the "Romance" check box, the background changes and the tag becomes: <ul id="genres-bar" class=" romance"> I'm trying to figure out how to access an ...

The responsiveness of the bootstrap mobile view is experiencing some technical difficulties

https://i.sstatic.net/IuQXa.pngUsing Bootstrap 4 in my project and I have implemented the following bootstrap codes with an external CSS file in the HTML view, <div class="jumbotron rounded-0"> <div class="container"> &l ...

Top choice for asp.net form tooltip?

Searching for a tooltip solution to provide input instructions to users filling out a form. Recommendations for a user-friendly, straightforward code or plugin? Specifically looking for tooltips that appear when a textbox is selected, with the capability ...

Update the information within an HTML element upon clicking a menu option

Is there a way to dynamically load the content of various HTML files into a specific element on my index.html page when different menu links are clicked? This would help avoid duplicating menus across multiple HTML files and make maintenance much easier. ...

Is it best to stick with a static page size, or

While I typically design my webpages dynamically by determining the screen size and creating divs accordingly, I'm curious about the advantages of using a 'static' sizing approach (such as using pixels). Any insights on this contrasting meth ...

Sending information from a dynamic table to a database using PHP

I've created an HTML webpage with a table that fetches data from my database. Each row in the table has a button that, when clicked, dynamically adds the data into another table on the webpage using JavaScript. The dynamic table includes a submit butt ...

What is the process to design and implement this button using HTML and CSS?

I am in need of creating a button similar to the google button shown in the image, but I am struggling to position it correctly on the margin. Can someone please assist me with this? The google button is the specific type of button that I am aiming to rep ...

Painting issue on Chrome and Opera browsers

I've discovered a strange issue with my page rendering in blink browsers where it paints and then suddenly "unpaints." Once the page has loaded, most of the viewport becomes blank and stops painting. Here is how the screen should look after I manually ...

Creating a stylish CSS effect by adding a dashed border underneath two div elements

Looking for help with a layout where there are two tables side by side, represented by the blue boxes. The goal is to be able to select a row in each table and then click the red link button below. The connecting lines between the boxes and the link button ...

Dynamic collapsible containers

I discovered a useful feature on w3schools for collapsing elements: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_collapsible_symbol However, I would like to reverse it so that all elements are initially shown when the page loads, and then ...

When utilizing Django on an Apache web server, an issue arises where a 'dict' object does not possess the attribute 'render_context'

I've encountered an issue with my Django project after uploading it to a web server that runs apache, mod_python, and django. The code works perfectly fine on the development computer. nameBox = getNamesBox().render(locals()) - def getNamesBox(): ...