Remove border on mobile display

Hello everyone, I have a question regarding CSS styling in Bootstrap framework. I am currently using Bootstrap to create a simple webpage with gray borders on certain div elements. However, when viewing the page on mobile, some of these divs are hidden and the border color looks out of place. Is there a way to target CSS elements with Bootstrap so that when the page is resized for mobile, the border color changes to black or does not show at all?

Below is a snippet of my code:

<div class="container">
    <!--Start of row-->
    <div class="row">
    <!--leftdiv1-->
     <div class="col-sm-6" id="left1">
        <h3 class="text-center" id="main">XXXXXXX</h3>
        <p class="text-center">XXXX & XXXXX</p>
     </div>
  <!--rightdiv1-->
 <div class="col-sm-6 hidden-xs contacts" id="right1">
    <ul>
        <li><a id ="print" href="#"><span class="glyphicon glyphicon-print"></span> Print</a></li>
        <li><a href="https://drive.google.com/file/d/0B1NTGaJa5XdtVlpvQUttVWhmMXM/view" target ="_blank"><span class="glyphicon glyphicon-save-file"></span> Download</a></li>
        <li><a id="contact" href="#"><span class="glyphicon glyphicon-earphone"></span> Contact</a></li>
    </ul>
  </div>
</div>

CSS Code Snippet:

#left1 {
    border-right: dashed grey 3px;
    border-bottom: dashed grey 3px;
    height: 100px;
    overflow: auto;
}

#right1 {
    border-bottom: dashed grey 3px;
    height: 100px;
    overflow: auto;
}

Answer №1

A solution to hide the "col-xs" at sizes less than 768px can be achieved by using CSS media queries. Here is an example code snippet that you can include in your stylesheet:

@media (max-width: 768px) {
#left1 {
    border-right: 0px;
    border-bottom: 0px;
}
#right1 {
    border-bottom: 0px;
}
}
Check out Bootstrap CSS for more information.

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

Apply a CSS class to the initial item in each carousel present on a webpage

I am utilizing Bootstrap 4's carousel to showcase dynamic content. The challenge lies in marking the first item of the carousel with the CSS class ".active". While it is typically added directly in the HTML, it becomes complicated when dealing with dy ...

What is the best way to send information from App.js to components?

In my project, I am working with App.js and a functional component called "uploadlist". The goal is to pass a 'custid' value from App.js to the uploadlist component. Here's what I have attempted: app.js: export default class App extends Com ...

Modifying the button for the ajaxtoolkit:AsyncFileUpload widget

I am currently using the ajaxtoolkit:AsyncFileUpload and I'm curious if there is a way to customize the button that comes with it? <ajaxtoolkit:AsyncFileUpload Width="200" ID="filImageUpload" ThrobberID="imgUploadProgress" OnUploadedComplete= ...

Appium successfully triggers a click action on an obscured WebElement

I am facing an issue with my android appium test for an android application. The app contains a webview with a loader that appears at the start. There is a link within the app that I need to click on, which should navigate to another web-page. Although ...

A guide on utilizing Socket.io to efficiently transfer data to a specific client within a designated chat room

Can someone please advise on the correct way to send data to a specific client in a specific room using socket io? The code snippet I have been trying is: I am using the following command: socket.to(socket.id).emit('change', {data}) However, i ...

Optimal methods for organizing various perspectives on a one-page website

I am developing an application that incorporates AngularJS and Bootstrap. The current setup involves organizing various views using ng-show, allowing for view changes based on button interactions and the enablement/disabling of ng-show values. Within a si ...

Is the xmlhttprequest timeout/abort feature not functioning as anticipated?

Check out this snippet of my AJAX function: /** * This function initiates an AJAX request * * @param url The URL to call (located in the /ajax/ directory) * @param data The data to send (will be serialized with JSON) * @param callback The fu ...

Organizing outcomes from a for each function into an array using javascript

I have a form with multiple values of the same name, and I need to arrange this data in an array before sending it via AJAX. However, when I try to do this using the .push function, I encounter an error that says "Uncaught TypeError: dArray.push is not a f ...

Unable to retrieve image data from Ajax to Java, but successful in receiving the image bytes

Currently, I am in the process of sending an image to the server side. The base64 formatted image is received from a third party and for bandwidth optimization reasons, I intend to send this data in binary form (decoding is essential). It is important that ...

Steps to include an image slider for every react bootsrap card within a Card Deck

Having reviewed the official documentation for react-bootstrap, I have not come across any examples or seen this implemented anywhere. While I did find examples of how to move card elements in a carousel, it's not exactly what I'm searching for. ...

The function of React's useState is not available

https://i.sstatic.net/ltglP.png This error is new to me and I'm unsure why my code isn't working correctly. I noticed a similar example on the React.js Org website. Can someone please explain what's happening in my code? Any help would be ...

How do I avoid using an if statement in jQuery to eliminate errors caused by "undefined" values?

Whenever I incorporate third-party plugins, my usual practice is to initiate them in the main application.js file. For example: $('.scroll').jScrollPane(); However, a challenge arises when a page loads without the presence of the scroll class, ...

Execute AJAX requests at specified intervals with varying data on each run

Every 5 seconds, the code below is executed to retrieve different data each time: For instance: First interval = top level data (level.php) Second interval = top skill data (skill.php) Third interval = top magic data (magic.php) After completing the thir ...

Preserving the active tab in JQuery while dynamically regenerating tabs due to database updates

I have one default static tab and two dynamic tabs that are generated based on database records. Whenever there is a change in the database, I use the $('.dynamic').remove(); JQuery remove method to refresh the elements dynamically. The dynamic ...

Vue: Child component not rendering string prop

Hey there, I'm currently exploring the ins and outs of Vue and diving into its one-way data bind model, component registration, and passing props. Within my index.js file, I've set up my parent component to render a single child component for no ...

What is the best way to structure JSON data in JavaScript in order to effectively utilize a service?

I am attempting to connect to a service and have confirmed the correct connection, but I am encountering an error. I suspect that the JSON format may be incorrect. ERROR: net::ERR_ABORTED 500 (Internal Server Error). The technology being used is Jquery A ...

Accessing specific elements from a form using JavaScript/jQuery

I have a comprehensive form with approximately 25 inputs (text, radio, and checkboxes). I want to create a generic function that will disable all fields except for 5 of them when the jQuery dialog button is clicked. At first glance, this seems simple enoug ...

Update the content on the webpage to display the SQL data generated by selecting options from various dropdown

My database table is structured like this: Name │ Favorite Color │ Age │ Pet ────────┼────────────────┼───────┼─────── Rupert │ Green │ 21 │ ...

What is the best method in ASP.NET Boilerplate for retrieving JSON data?

I have been facing an issue while working on this code, constantly running into the error message: Unexpected token o in JSON at position 1 https://i.stack.imgur.com/43Ewu.png I am struggling to troubleshoot and was hoping for some advice or tips on r ...

Image expansion

I have a container element div that holds various content of unknown length. How can I add a background image that extends the entire length of the container since background-images do not stretch? I attempted to use a separate div with an img tag inside. ...