Troubleshooting Bootstrap 4/CSS: How to prevent bullet points from overlapping with input fields?

I am struggling with an unordered list where each list item contains an input element, and I am using Bootstrap framework.

Let me share my code snippet:

<html>
<head>
  <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
  <ul>
    <li class="check-item">
      <input type="text" class="form-control" placeholder="Enter something">
    </li>
  </ul>
</body>
</html>

The issue I am facing is that the bullet point of the li element is not appearing outside of the input field in Safari as it does in Chrome. In Safari, the bullet point only shows up when double-clicked and overlaps the input.

This problem seems to be related to Bootstrap, as without it, I do not face this issue.

I have attempted to fix this by adding the following CSS:

<style>
  ul {
    list-style-position: outside;
  }
</style> 

However, the problem persists. Can someone explain why this discrepancy exists between Chrome and Safari? And if there's a solution to make it work consistently across browsers?

Answer №1

In my opinion, the reason for this issue could be related to the default display behavior of input elements varying across different browsers. By setting the style attribute to "display:inline;" or "display:inline-block;", the problem seems to be resolved.

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

Troubleshooting: Owl Carousel Issue in Laravel 5.8 with Bootstrap

After struggling to set up the owl carousel for some time now, none of the solutions I found seemed to do the trick. I started to question whether it was even possible or if there was a crucial step I was missing. Despite trying numerous solutions, I coul ...

Dimensionality in relation to the size of an object

I constantly find myself questioning this. Whenever we use, for instance, width: 50%, that 50% is in relation to the width of its parent element. Let's say I have this code: <div id="root"> <div id="child"> </div> &l ...

Skipping every third index in a JQuery .each loop after removing an element

I have a project where I need to display elements in rows of 4, and when an element is deleted, I want the remaining elements to shift up. To achieve this, I am currently assigning a class "last" to every fourth item after a deletion and inserting a spacer ...

Selected radio button turns invisible after switching to another option

My issue involves two radio buttons, where one is initially "checked" based on the server response of 0 or 10. The objective is to click on either button to transmit new data to the server, with a value of either 0 or 10. Currently, I have functioning code ...

Anchor tags appear to be properly connected to IDs, however they are not functioning correctly

I can't seem to understand why this issue is occurring. My navigation bar works fine and the anchor links are functioning as expected, but when I click on them, the page either reloads or turns into a blank white screen. Here's a link to the pag ...

Tips for concealing the body description on the homepage of a blogger website

I want to conceal this description This is my blog and I am facing an issue where I need to hide the description on the home page. I have tried using color:white which worked initially, but when I moved the description to the top or left, the black backgro ...

Using a JavaScript function to swap out the contents of a div and encountering some unexpected behavior

I am encountering an issue while running a code that generates content using a function. The problem arises when I try to change the content onclick, as none of the CSS is applied again after the change. It's quite perplexing. Below is a generalized ...

Using an Image Fragment as a Background

I have a collection of images stored on a sprite sheet. My goal is to showcase a specific image from the sprite sheet as the background of my div container. The catch is, I want to ensure there is some blank space surrounding the selected image, requiring ...

What is the best way to adjust the autoplay volume to a set level?

I have a page with an audio element that autoplays, but I want to ensure the volume is set to a specific level in case a user has their volume turned up to 100%. Any suggestions on how to accomplish this? Here's the HTML code: <audio autoplay> ...

Is there a way to make height: 100% adjust to accommodate other elements with specific pixel heights within the same div?

I am facing a challenge with a container that has a specified height and contains two nested divs. The first div has a height defined in pixels, and I want the second div to fill up the remaining space in the container, which is essentially 100% minus the ...

Expand the list in both vertical and horizontal directions

I have a unique way I want this list to function: When clicked, it should reveal a vertical list. If an item in the vertical list is clicked, it should display horizontally with more information about that item. All items should be hidden until either Te ...

What is the best way to utilize the sx prop in Material UI for applying styles specifically when the component is active or selected?

In the code snippet below, I have set up the useState hook so that when a ListItem is clicked on, the selected state becomes true. My goal is to apply specific styling when an item is selected using the sx prop instead of creating a styled component for su ...

Ways to create more space between text and images with Bootstrap 5

Is there a way to adjust the spacing between descriptive text and an image on a webpage? I've tried fixing it, but it didn't work. How can I ensure that my text is properly separated from the image? Thank you. <!DOCTYPE html> <html lang ...

Is there a way to recycle an image and ensure that the web browser only needs to download it once?

Is there a way to effectively reuse the same image multiple times on my website without inefficiently downloading it each time? ...

Is there a way to customize the navbar layout so that link 1 is aligned to the right side, link 2 is centered, and link 3 is positioned on the right?

I attempted to utilize the flex property and justify content, but unfortunately that did not yield the desired result. I experimented with the code provided below. The goal is to create a website layout with a logo at the top and a navigation bar directly ...

Is it possible to clear a row of images and then repopulate it with new images without losing the click listeners associated with each image?

I am currently developing a memory game that involves clicking on images as the main objective. After clicking on an image, the pictures are then rearranged on the page. However, if you click on the same image twice, you will lose and the game will reset. ...

The problem with the Bootstrap Navbar Dropdown is that it opens up within the confines of

I have created a navigation bar using Bootstrap 4 and included the .navbar-bottom class to enable scrollbar functionality when there are more menu items than the total width of the page. However, an issue has arisen where the Bootstrap 4 navbar dropdown o ...

Arrange components in a table format in a horizontal manner

I am currently working on developing an App that features a slide in/out menu. The challenge I am facing is getting the images to display in two rows within this menu and implementing a horizontal scroll functionality. Additionally, I would like to include ...

How come the text is not centered when I use text-align:center; on my class "text5"?

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Homepage</title> ...

Ensure the heading expands to fit the container and include > at the conclusion

Could anyone help me create a heading effect link similar to the one on BBC's website at ? I'm specifically looking to achieve an effect where the heading text is on the left and an arrow is displayed on the right. Additionally, I would like both ...