I aim to display a well-optimized mobile view by utilizing Bootstrap CSS

I need my website to be mobile responsive and I want the mobile view to have specific changes. Simply adding cd-xs-12 or even cd-sm-12 is not achieving the desired outcome.

https://i.sstatic.net/0GU2h.jpg

This is the current code I have:

.mobile-select {height:50px;padding-top:15px;padding-left:60px;padding-right:20px}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
                        <div class="row breadcrumb bg-white border-bottom paddl30">
                            <div class="col-md-6">
                                <ul>
                                    <li><a href="">Devices</a></li>
                                    <li> &gt; </li>
                                    <li>Screen Analytics</li>
                                </ul>
                            </div>
                        </div>
                        <div class="row mobile-select border-bottom">
                            <div class="col-md-6">
                                <ul class="device-menu bg-white" id="selMenu">

The solution is to add <br class="visible-xs"> wherever necessary.

Answer №1

Simply include clearfixes, my friend. Here is an example:

<div class=clearfix></div>

And in the CSS file, it should appear as follows:

.clearfix {
clear: both;
}

Answer №2

Make sure to insert the following lines into your head tag.

<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>

Don't forget to double-check your div tags and ensure that all elements are correctly placed.

Answer №3

Here's a tip for you to try out! By adding col-xs-12, the elements' heights should render correctly. Use "*" as your identifier in the code to track any changes.

<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
  </head>

    <style >

    .mobile-select {height:50px;padding-top:15px;padding-left:60px;padding-right:20px}
    </style>


    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"/>

    <div class="row breadcrumb bg-white border-bottom paddl30">
      <div class="col-md-6">
        <ul **class="breadcrumb/**>
          <li><a href="">Devices</a></li>
          <li> > </li>
          <li>Screen Analytics</li>
        </ul>
      </div>
    </div>
    <div class="row mobile-select border-bottom">
      <div class="col-md-6 **col-xs-12**">
        <ul class="device-menu bg-white **col-xs-12**">
          <li class="selected **col-xs-12**">
            <a href="javascript:void(0)" id="mobileAppScreens">Mobile</a>
            <span class="sub-menu-menu"> 
                <i class="fa fa-chevron-right" aria-hidden="true"></i>
                <a href="javascript:void(0)" ng-click="" id="iosMobileAppScreens" class="checked"> <i class="fa fa-apple" aria-hidden="true" ></i> ios</a>
                <a href="javascript:void(0)" ng-click="" id="androidMobileAppScreens"><i class="fa fa-android" aria-hidden="true"></i> Android</a>
             </span>
            <span class="grey-pipe">|</span>
          </li>
          <li **class="col-xs-12"**>
            <a href="javascript:void(0)" id="tabletAppScreens">Tablet</a>
            <span class="sub-menu-menu hide"> 
                <i class="fa fa-chevron-right" aria-hidden="true"></i>
                <a href="javascript:void(0)" ng-click="" id="iostabletAppScreens"><i class="fa fa-apple" aria-hidden="true"></i> ios</a>
                <a href="javascript:void(0)" ng-click=""  id="androidtabletAppScreens"> <i class="fa fa-android" aria-hidden="true"></i> Android</a>
             </span>
          </li>
          <li class="hidden">
            <input type="text" id="selMenu" value="iosMobileAppScreens">
            <input type="text" id="sDate">
            <input type="text" id="eDate">
          </li>
        </ul>

      </div>
      <div class="col-md-6 **col-xs-12**">
        <div id="dateRangescreenAnalytics" class="pull-right">
          <i class="glyphicon glyphicon-calendar txt-green fa fa-calendar"></i>
          <span></span><b class="caret"></b>
        </div>
      </div>
    </div>

<!-- end snippet -->




</html>

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

How can I show a tooltip in vuetify when a button is disabled?

I am currently using the button and tooltip components in my Vuetify project. I am trying to find a way to only display the tooltip when the button is disabled, but I'm having trouble figuring out how to do it correctly. Right now, the tooltip only a ...

Can you explain the significance of the `?` symbol before an object attribute? And why is my TypeScript file not recognizing it?

I have always utilized this particular behavior in Angular using the *ngIf directive when dealing with an object that could potentially be undefined or not the required object. <div *ngIf="object?.foo"> ... </div> Although I know that this ...

The web server is serving an HTML file instead of the expected JSON response

Is there a way to extract the JSON data from ? I have tried using AJAX but it only retrieves the entire HTML page instead. $.ajax({ url: 'http://www.bartdekimpe.be/anoire/index.php/admin/getGamesUserJson/34', success: function(data) { ...

Next.js: Extracting the Value of an HTTP-only Cookie

While working on my web app with Next.js, I implemented authentication management using HTTP-only cookies. To set a cookie named token, I utilized the following code snippet with the help of an npm package known as cookie: res.setHeader( "Set-Coo ...

The mobile functionality of the stylesheet is not functioning properly

Recently, I came across an issue with a stylesheet designed for mobile devices that contains the following code: /* Smartphones (portrait) ----------- */ @media only screen and (max-width : 320px) { /* Styles */ } Surprisingly, this code failed to work ...

Is it possible to nest Twig variables within other Twig variables?

While developing a website for a reggae backing band, I encountered an issue on the 'booking' page where I have a form. Upon submitting the form, I conduct checks to ensure all required fields are filled in and to verify if any errors occurred. ...

What causes the scrollbar to not extend to the bottom when connected to another scrollbar via a JavaScript equation?

I have been working on a code that involves multiple scrollbars that are all linked together. When you move one scrollbar, the other two will move proportionally. However, due to differences in width, the scroller doesn't always reach the end of the s ...

How can I implement Jquery ajax calls in various JavaScript functions?

I'm encountering an issue with a particular function in my code function readComm(){ $.post("something.php", {read:"read"}, function(data){ retVal = $.trim(data).toString(); console.log(retVal); return retVal; }); } T ...

Struggling to retrieve the accurate input value when the browser's return button is clicked?

Having multiple forms created for different conditions, each one submits to a different page. However, when I navigate back from the other page, all my forms display the same values as before. Here's the code snippet: <form action="<?php echo b ...

When I implement the persist gate in Next.js with Redux, the flex direction automatically adjusts

I'm currently developing an app using next js and redux. An interesting issue has arisen - when I include PersistGate in my _app.js file, the flex direction mysteriously changes from row to column in index.js. There haven't been any modifications ...

The .click function in jQuery ceases to function after being utilized once

I've encountered an issue with my .click jQuery function. The desired behavior is that when I click the button, one div should be hidden (display:none) and another div should be shown (display:block). This works as expected the first time the button i ...

What is the best way to serve individual static files in Express without revealing the entire "/static" directory?

For my new project, I am working on a simple setup that involves using JWT for authorization. The project is being served entirely through express, with no separation between frontend and backend. My goal is to dynamically serve specific HTML files based o ...

Exploring the Link Between jQuery and HTML

Is it possible to connect between an HTML file and a jQuery file? Here is an example scenario: jquery-test.js: $(document).ready(function(){ $('#inputForm').submit(function(){ $('#inputForm :text:not("#submit")').each(func ...

Is it necessary to create a separate animation class to trigger CSS keyframe animations based on scroll position?

My website has a background animation that controls various shapes, each with their own unique animation styles: animation: animShape 50s linear infinite; The speed of the animations varies depending on the shape being displayed. The animShape keyframes ...

Browserify does not provide access to the require function in the browser environment

I am currently in the process of developing a web application using node.js along with express. My goal is to leverage Browserify in order to expose my local modules to the browser. Here is the structure of my application: ├── app.js ├── lib ...

Repairing my CSS with jQuery fullpage.js

My CSS on needs fixing. The word Obert is not aligning properly in the section. Interestingly, everything works fine without Javascript: I suspect the wrapper divs created by the plugin are causing the issue. Can someone lend a hand, please? ...

Serve the mobile version to mobile visitors and the desktop version to all other visitors

Can someone please explain to me how I can display the Mobile Version of a website when visiting on my phone, and the Desktop Version when viewing on anything larger than 500px? I have separately created both a Mobile Website and a Desktop Website. Is it ...

Tips for automatically closing the Toggle Navigation feature in Vue JS when a user clicks outside of the navigation container

Is there a way to close the toggled navigation menu automatically when the user clicks outside of the navigation container? I have implemented two ul menus inside the navigation menu and would like the subNavActive, safNavAcitve, and repNavUl variables to ...

Guide on using jQuery to incrementally cycle through an array using a button

I am facing an issue with iterating through an array of objects using a button. The iteration is skipping 2 on each click instead of moving to the very next record. Can someone help me troubleshoot this problem? Or suggest a better approach to iterate thro ...

Interact with SOAP web service using an Angular application

I have experience consuming Restful services in my Angular applications, but recently a client provided me with a different type of web service at this URL: http://123.618.196.10/WCFTicket/Service1.svc?wsdl. Can I integrate this into an Angular app? I am ...