user6826584
user6826584

Reputation: 81

Customize for mobile devices

I have a website (http://studenter.miun.se/~liha1507/dt100g/data/) that I want to customize for mobile devices and it do, but you can still move the site in sideways when you view the page on the smartphone. Someone who know how to solve this problem?

Upvotes: 1

Views: 42

Answers (2)

Tremmillicious
Tremmillicious

Reputation: 506

Use bootstrap well and remove the inline style to a css

on your html

<div id="my-div-1" class="col-md-6"></div>
<div id="my-div-2" class="col-md-6"></div>

CSS use auto when at that breakpoint like so

  #my-div-1 {
    width: 815px;
  }
  #my-div-1 {
    width: 335px;
  }

  @media (max-width: 992px) /* Check what the width is for the breakpoint */
     #my-div-1,  #my-div-2 {
         width: auto;     
     }
  }

Upvotes: 0

trevorp
trevorp

Reputation: 1168

You have some hard-coded width styles on your columns (inline in the HTML).

Change both of your columns from this:

<div class="col-md-6" style="width:815px;">

To this:

<div class="col-md-6">

Upvotes: 1

Related Questions