Guide to reaching Notebooks and Desktops with Bootstrap 4:

When working on websites, I often find myself having to adjust the CSS for two common screen resolutions - 1366x768 and 1920x1080. Even though Bootstrap's largest grid is 1200px wide, there are instances where customization is needed.

What is the best approach to target Notebooks with a resolution greater than 1200 but less than 1400, and actual Desktops with a resolution higher than 1400 in Bootstrap 4?

Answer №1

If you're looking for some guidance, check out this link:
https://codepen.io/panchroma/pen/GxLVyp

HTML Code:

<div class="container">
 <!-- insert content here -->
</div>  

CSS Styling:

@media (min-width: 1200px) and (max-width: 1400px){ 
  .container{
    max-width: 1168px;
    background-color:olive;
  }
}

@media (min-width: 1401px) { 
  .container{
    max-width: 1368px;
    background-color:teal;
  }
}  

Feel free to adjust the max-width and other styles for these two new media queries according to your needs.

This code should be compatible with Bootstrap 4 auto layout columns, as demonstrated in this example: https://codepen.io/panchroma/pen/VXOZVW

Best of luck!

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

Is there a way to turn off step navigation in bootstrap?

Displayed below is a visual representation of the bootstrap step navigation component. Presently, there is an unseen 'next' button located at the bottom of the page. When this 'next' button is pressed, it transitions from 'step-1 ...

Having trouble adjusting row height in Bootstrap 4

https://i.sstatic.net/NLDho.png Context: Utilizing Bootstrap 4 framework 2 rows, each with 4 columns HighCharts visualizations in each cell Challenge Faced: The cells have a fixed height that is unchangeable Solution Attempts: Applied inline heigh ...

Is it feasible to integrate "tutorials" in HTML and CSS?

I have a vision to incorporate a "guider" into my application, a dialog box designed to help guide users by visually introducing them to significant features: Specifically, I am interested in functionalities like attaching the guider to an element on the ...

Trigger a function from a Bootstrap modal

Here is a preview of my HTML code : <form action="form2_action.php" method="post"> <table> <tr> <td>First Name </td> <td>:</td> <td><input type="text" id="f ...

Images are not visible when scrolling horizontally

Hello everyone, this is my first time reaching out with a question here! I've been working on setting up a horizontal scroll feature and I'm almost there, but I'm encountering an issue where the scroll bar is appearing at the bottom of the ...

Creating a sleek and modern 5-column footer design with Bootstrap styling

Apologies if this question seems basic, I am just beginning to explore HTML, CSS, and bootstrap. My goal is to create a footer with five columns using bootstrap. While I have managed to establish the five columns, I have spent hours attempting various met ...

Develop a personalized component featuring various sub-categories

Currently, I am in the process of implementing a data-table element using custom elements (web components). Each row in the table can contain different types of cells such as text, number, date, etc. For example: <my-table> <my-table-cell-te ...

Having trouble accessing CSS images in JSF

Issue Details : I am currently facing a problem with setting menu background images in my JSF application using CSS properties. The file structure is as follows This is the CSS snippet Style.css #menu { height:35px; width:950px; backgrou ...

Tips for updating or toggling an icon within a button with the help of Bootstrap 5 and jQuery

Looking to switch the icon displayed inside a button upon clicking? The initial icon is <i class="fas fa-bars"></i>, and after being clicked, it should change to <i class="fas fa-times"></i>. How can this be ach ...

Resolving issues with CSS placement and resizing

I have been considering developing a UI toolkit that offers an intuitive and powerful way of setting the position and size of elements/widgets. Here are some examples of how it could be used (although they are not currently implemented): ui("Panel").size( ...

Tips on determining the type of DOM element for CSS Selector adjustment

In this case, $self is not returning the expected result and I am getting "undefined". To adjust the CSS selector to correctly target the desired element, I need to determine which element type I am dealing with. Is it the "ul", "li", or "a" element? Whil ...

Styling markdown text causes the text to vanish and it is impossible to include a background color

I'm facing a puzzling React markdown problem. Within this snippet: <ReactMarkdown className={styles.reactMarkDown} escapeHtml={false} components={renderers} > {content} </ReactMarkdown> I am attempting to apply a backgr ...

Retrieve the values of the children within a div tag

Hello there, I am attempting to retrieve all the child values from the parent div .clonedInput when the .send button is clicked. I also want the output to be formatted as shown below and placed in a temporary alert(); variable for code confirmation. //Exa ...

What steps can be taken to avoid a component from re-rendering (or maintaining its state unchanged) during page transitions?

Is there a way to prevent a shared component, like a sidebar, from re-rendering when transitioning between two pages? Specifically, if the sidebar is fixed at a certain y position in the scroll track, how can we ensure that it remains unchanged when navig ...

Creating a personalized circular progress bar using React

I am looking to replicate this specific design using React and React Native [![enter image description here][1]][1] After attempting to implement it with the React Circle Progressbar package from here, I have not been successful in achieving the desired ...

What is the best way to format changing text within a paragraph?

If I needed to implement this functionality using JavaScript: ...... if (!isNaN(num)) document.getElementById("isNum").innerHTML = num +" is a number"; ...... Then in HTML : <div> <button onclick="checknum()">Enter any value : </b ...

When resetting a form, the styled radio buttons remain selected and do not deselect

I have a set of three styled radio buttons for car rental pickup locations: <div class="col-md-12 form-group"> <label for="car-rental-pickup-location" class="mb-2">Pickup Location<small class="text-danger">*</small></label>&l ...

What is the best way to make a div stick to the inside of another div with Bootstrap?

As a newcomer to Bootstrap 4, I am curious if there is a way to affix a div to the bottom of its parent div. My structure involves using the classes .container within a .row, along with several child divs: <div class='container'> <d ...

Issue with Media Queries for adjusting width not functioning correctly

I'm currently working on a JavaScript calculator project and I'm having trouble making it responsive. Specifically, when the screen size decreases, the buttons in the calculator are not displaying properly, especially the operator buttons. I woul ...

Tips for utilizing multiple CSS styles in JavaScript

My goal is to apply multiple CSS styles to a button with the id of name_button. Below is the JavaScript code I have written: var name_button = document.getElementById('name_button'); name_button.style.display = 'block'; name_button.st ...