So I made my project for this challenge but I am unable to figure out how to properly apply the container_fluid or img-responsive features to allow mobile phone use of the code, which is html and javascript.

This is my pen
the HTML is below

<div class="text-center container-fluid">
  <h1> Your Weather Report </h1>
  <h2> by codeslobode </h2>
<ul class="list-unstyled">
  <li class="btn btn-default" id ="city"> </li>
  <li class="btn btn-default" id ="weatherType"> </li>
  <li class="btn btn-default" id="far" > </li>
  <li class="btn btn-default" id="windSpeed"> </li>


  var long;
  var lat;
  var far;
  var cel;
  var kelvin;
  if (navigator.geolocation) {
   long= position.coords.longitude;
   lat= position.coords.latitude;
var api = ""+lat+"&lon="+long+"&appid=cb7c605cd1f3e9c1b7c52e17c612ae60";
$.getJSON(api, function(data){
  var weatherType=[0].description;
   kelvin = data.main.temp;
  var windSpeed = data.wind.speed;
  var city =;
  var tempSwap=true;

 $("#far").html(far + " &#8457;");
  if (tempSwap===false){
        $("#far").html(far +" &#8457;");

    $("#far").html(cel + " &#8451;");

  windSpeed= (2.237*(windSpeed)).toFixed(1);
        $("#windSpeed").html(windSpeed + "mph");   
if (far<70){
$('body').css("background-image", 'url(')
else  if (far>70){
$('body').css("background-image", 'url(')  


You shouldn’t be using both versions of Bootstrap on the same page. Your code works with version 3.

Thanks I took out bootstrap4 but still not mobile code :frowning:

setting height to 100% on both body and html and background-size to cover and background-repeat to no-repeat on body might help!

1 Like

Thank you very much rachnaban! so far this has been helpful. I applied the settings and it at least let me display the image, header, and the outline of the button to be visible on mobile app but i can’t get the actual code to start. The buttons are blank wont display the city temperature and etc data.

This is the CSS i added to implement your advice. ill keep working on it, but i’m reaching a point where i’m not sure what to do next to display my js data in the css buttons. If someone can spot what in the below css needs changing relative to the above html and javascript(which have not been changed) let me know thanks :smile:

    background-position: center center;
   width: 100%;
  padding: 0;
  margin: 0;
  -webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
.btn {

Hi @codeslobode, I cannot see the above changes in the codepen link which you had shared previously. Please share the link again

Yes i forked it to play around with another version here is that link with the css

I’ve edited your post for readability. When you enter a code block into the forum, remember to precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.