What could be causing the text in the sidenav to vanish when the screen width reaches a specific size?

Disclaimer: This website is my first attempt at development, so I tend to make minor errors that can be hard to catch. The sidebar and submit button remain intact, but the checkboxes and their labels disappear when the screen size is reduced below a certain threshold. It seems like the font-size might be causing this issue because shrinking the text reveals the missing content.

@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,700');
html, body, h1 {
  font-family: 'Poppins', sans-serif;
  color: #222;
}

h1{
  font-weight: 2000;
  font-stretch: expanded;
  font-size:2em;
}
a:link, a:visited{
  color: white;
}
a:hover{
  color: green;
}
.navbar {
  padding: .8rem;
}
.navbar-nav li{
  padding-right: 20px
}
.nav-link{
  font-size: 1.1rem !important;
}
.carousel-inner img {
  width: 100%;
  height: 100%;
}
.carousel-caption {
  position: absolute;
  top:49%;
  transform: translateY(-95%);
}
.carousel-caption h6{
  color: white;
  background-color: rgba(150, 100, 150, 0.5);  /* 50% transparent */
  font-family: sans-serif;
  font-weight: 1000;
  border-radius: 25px;
  padding: 5px;
}
.sidenav{
  width: 150px; /* Set the width of the sidebar */
  position: fixed; /* Fixed Sidebar (stay in place on scroll) */
  z-index: 1; /* Stay on top */
  top: 75px; 
  padding-top: 5px;
  background-color: rgba(50,50,50, 0.5);  /* 50% transparent */
}
.carousel-caption h2{
  font-family: sans-serif;
  color: black;
  font-weight: 500
}
.btn-primary{
  background-color: #6648b1;
  border: 1px solid #6648b1;
}
.row{
  margin-top: 20px;
  margin-left: 400px;
  padding: 10px;
}
.brn-primary:hover{
  background-color: #563d7c;
  border: 1px solid #563d7c;
}
.jumbotron {
  padding: 1rem;
  border-radius: 0;
}
.padding {
  padding-bottom: 2rem;
}
.welcome {
  width: 75%;
  margin: 0 auto;
  padding-top: 2rem;
}
.welcome hr{
  border-top: 2px solid #b4b4b4;
  width:95%;
  margin-top: .3rem;
  margin-bottom: 1rem;
}

.fa-facebook, .fa-instagram, .fa-youtube{
  font-size: 2em;
  margin: 1rem;
}
.fa-facebook{
  color: white;
}
.fa-instagram{
    color: grey;
}
.fa-youtube{
  color: red;
}
.social a{
  font-size: 4.5em;
  padding: 3rem;
}

/* screen size xs */
@media (min-width: 1px) and (max-width: 499px){
...

Answer №1

The important thing to note is the use of the classes d-none d-sm-inline. This combination signifies that the element will have display: none, but will change to display: inline if the screen size exceeds 576px. This behavior explains why it disappears on screens smaller than 576px. To prevent this disappearance, simply remove the d-none class.

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

Display the contents of a JSON array in an HTML format

I have designed an exercise that requires me to display the cities corresponding to each department based on a JSON file. Currently, I am able to display the departments in their respective selections, but I am struggling to only show the cities that corre ...

Is there a quicker method than using document.getElementById('element-id').innerHTML to retrieve content?

Currently, I am developing a user-friendly step-by-step wizard for my website to gather information about custom orders. Utilizing JavaScript, I have been tasked with updating the content of each "page" using the document.getElementById('element-id&ap ...

What could be causing the overflow of my <table> data from its parent <div> container in Bootstrap?

Currently, I am trying to utilize angular in conjunction with bootstrap to present my data. I have mock data stored within a component and displayed in the html file of that component. However, I am facing an issue where when the table expands in size, it ...

Display the selected checkbox in the table

I am struggling to display the selected check value in a table. I am having difficulty in showing the check values corresponding to each row in the table based on my selected value. For instance, in the code snippet below, I have selected values as true,f ...

What is the best way to include a component within a content-editable div in Vue.js?

Looking for the correct way to add a div inside a content-editable div on a click of a button in vue js. Here's the code I have been experimenting with: var ComponentClass = Vue.extend(AddTag) var instance = new ComponentClass({ propsData: { type: ...

Is it possible to enhance the appearance of the select2 options in any way?

I am currently using a select2 plugin to handle select boxes, where the options are generated by concatenating two values together. However, I am looking for a way to style one of the values in the select2 box with a different color. Are there any options ...

Creating alternate blocks of even and odd numbers using a while loop with an odd number as the starting point. Man

My title may be a bit confusing, so if you can make it clearer for everyone, please edit my post. Thank you. I have created a while loop and I want the blocks to form an X pattern. I have two blocks next to each other every time. But I want them to alter ...

What is the best way to identify the complete template of an Angular component's CSS without mentioning any specific tags?

Typically, I structure each view with an outer DIV that serves as the foundational background. <div class="outer"> <!-- Content goes in here --> </div> Then, within my SASS file, I apply styles to it like this. div.outer { ... } Thi ...

What is the best method to update the content of one div with content from another page using AJAX?

Having trouble achieving smoother page loads? My goal is to utilize AJAX to specifically fetch a certain div from another page and then swap out the content of a div on this current page with the response. Below is my JavaScript script that uses AJAX to r ...

I came across a small piece of CSS code that isn't functioning properly when tested on jsfiddle

I'm on the hunt for a cool "typing animation" with three dots. Stumbled upon this gem online -> https://codepen.io/mattonit/pen/vLoddq The issue is, it doesn't seem to work for me. I even tried it on jsfiddle and it just stops working. I att ...

Attempting to bind an input parameter using NgStyle in Angular version 2 and above

Issue: I am in need of a single component (spacer) with a width of 100% and a customizable height that can be specified wherever it is used in the HTML (specifically in home.html for testing): number 1 <spacer height="'200px'"></spa ...

The alignment of flex items is not consistent in Webkit browsers

One of the issues I am facing involves a text field that contains a cogwheel symbol which opens a popup menu with different search options. The layout is set up using a flexible box model for certain elements. After testing in Firefox, the display is as e ...

Ways to organize divs in a layout resembling a partial table

While working on my e-commerce platform with vue.js, I noticed that my product listings are not aligning properly, as displayed in the image linked below. https://i.sstatic.net/2FwaA.png My goal is to achieve the desired layout illustrated in the image b ...

The Javascript function I created references a variable that seems to be undefined in the code

Recently, I discovered a function that is triggered with an onclick event using "openNav()" from an HTML element. Below is the code snippet for this function: function openNav() { document.getElementById("nav-drawer").classList.add("nav-drawer-open"); ...

What is the best way to conceal a div element on a Razor Page depending on the user's input?

How can I display the state field only when the user selects United States in the country field, and hide it otherwise? Here is the code snippet from my cshtml page: <div class="form-group col-sm-4 mt-4"> <label asp-for="Form.Co ...

Automatically populating and submitting a form after receiving search results via ajax

I have been struggling with this issue for a few days now and could really use some help from the experts here. I am new to sql, javascript, jquery, ajax, css, and php. Although I studied Computer Science in college 15 years ago, I seem to be missing some ...

The functionality to display or conceal divs containing repeaters is not functioning properly

Having a bit of trouble trying to display one div with a slideshow and hide another containing a list of images on larger screens, like desktops. I want to do the opposite on smaller screens. Both Div's have repeater controls, but I don't think t ...

Click to Resize Window with the Same Dimensions

I have a link on my website that opens a floating window containing more links when clicked. <a href='javascript:void(0);' onclick='window.open("http://mylink.html","ZenPad","width=150, height=900");' target='ZenPad'>&l ...

Encountering a NullPointerException when transferring inputs from scala.html to Controller as a form in Play framework (version 2.8.*) using

I am currently developing a Java web application using the Play Framework (2.8.19). In the process of creating a registration page, I encountered an issue with passing inputs from the registration page written in Scala to the controller class that is respo ...

Clarity of visual in a lattice

I'm encountering a small issue with my ExtJS 4.2 MVC application that involves grid and image transparency. Below is a snippet of my grid setup: Ext.define('XProject.view.message.inbox.Grid', { extend: 'Ext.grid.Panel', al ...