Jump to content

Peter1990

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Peter1990

  1. Hi everyone,

    These days I am working on my new project. The idea is the following: I want to insert google maps in my project. When the user click on some city, to display the table with the weather information for the city. For now I implemented google maps on my project. Also I set markers for specific places. Now I want to implement weather API, so when the user click on some specific city to display weather information.

    This is the tutorial I followed in order to implement google maps in my project:

    https://www.youtube.com/watch?v=Zxf1mnP5zcw&list=LLy8VbuH9TRk0RyLzTMcgqCg

    This is how my idea should works:

    https://openweathermap.org/weathermap?basemap=map&cities=true&layer=temperature&lat=46.3166&lon=18.9844&zoom=5

    You can see from the second link that when you click on some city, the weather info appears.

    Can someone please tell me how to do this?

    I was searching on youtube, google, stackoverflow for days, but with no result.

    Thanks!

  2. 12 hours ago, dsonesuk said:

    Bootstrap uses !important A LOT! so you have to do the same and use this to overide bootstrap properties using !important.

    dsibesuk, thank you for your answer.

    I know that bootstrap use !important, but I don`t understand you what should I do? What does it means to overide bootstrap properties? 

    Do you mean I should use !important in my style.css file?

    Do you mean I should remove !important from bootstrap file?

    Also, I tried to set my style.css file after the bootstrap, but with no success.

    I tried to use !important in my style.css file - no success.

  3. Hi,

    After I used bootstrap in my project, I recognized that it makes problems in my CSS file.  Every parameter that I used in my CSS file is misplaced when I use Bootstrap. 

    When I comment my Bootstrap file, everything is OK. 

    What should I do in order these two files to works independently?

  4. Hello,

    After I made few tutorials on w3schools.com, I am running on my first project. For now I need to create sub pages for my website. So, I would like to ask you, what is the best way to to this?

    I watched few video tutorials on Youtube. One way is to create with links, using <a href="link to the page">link</a>.

     

    So, my question here is the following: what about CSS? For each HTML page I need CSS code to style the HTML code. So, when you create maybe 20 (or more) sub pages, for each HTML you need CSS code too (20 or more).  Whether it will be too much code? Is they any way to reuse the same CSS code?, to display in the all HTML sub pages?

     

    thank you in advance.

     

     

     

     

  5. Hello,

    I am pretty new in JavaScript. These days I am implementing slideshow on my project. But I am facing with two  problems:

    Problem number 1: I would like my slideshow to have two options :

    - option number 1: arrays with user can slide images manually

    option number 2 I want images to slide automatically for (lets say) 5 seconds.

    My problem is that I can`t implement these two options to run together. On w3schools.com they are codes for option number 1 and option number 2 but are separately, and I can`t implement to run together. Is there any way there options to run together?

     

    Problem number 2: It will be much better for my project if I can implement some cool slides when my images slides. For now, they are sliding normal from right to left, but as I can see, they are options for images to slides on very cool way. Here there are some cool slides: https://amazingslider.com/examples/

     

    My code is here:

    CSS:

     

    .slideshow-container {

      positionrelative;

      max-width1200px;

      box-sizingborder-box;

      marginauto;

    }

     

    .number {

      positionabsolute;

      colorwhite;

      margin15px;

      font-size18px;

    }

     

    .text {

      color#f2f2f2;

      font-size15px;

      padding8px 12px;

      positionabsolute;

      bottom8px;

      width100%;

      text-aligncenter;

    }

     

    .prev {

      positionabsolute;

      top50%;

      colorwhite;

      font-size35px;

      left0;

      padding-left15px;

      padding-right15px;

      background-colorblack;

    }

     

    .next {

      positionabsolute;

      top50%;

      colorwhite;

      font-size35px;

      right0;

      padding-left15px;

      padding-right15px;

      box-sizingborder-box;

      background-colorblack;

    }

     

    .prev:hover,

    .next:hover {

      background-colorgray;

      cursorpointer;

    }

     

    .dot {

      width15px;

      height15px;

      background-colorlightgray;

      border-radius50%;

      margin5px;

      displayinline-block;

      cursorpointer;

    }

     

    .active {

      background-color#717171;

    }

    .container {

      positionrelative;

      width50%;

    }

     

    .image {

      displayblock;

      width100%;

      heightauto;

    }

     

    .overlay {

      positionabsolute;

      bottom0;

      left0;

      right0;

      background-colortransparent;

      overflowhidden;

      width100%;

      height10%;

      transition0.5s ease;

    }

     

    .container:hover .overlay {

      height100%;

    }

     

    .text-overlay {

      color#333;

      font-size20px;

      positionabsolute;

      top50%;

      left50%;

      -webkit-transformtranslate(-50%-50%);

      -ms-transformtranslate(-50%-50%);

      transformtranslate(-50%-50%);

      text-aligncenter;

    }

     

    .images-overlay {

      displayflex;

      margin-left15%;

      margin-right15%;

    }

     

    Javascript

    var slideIndex = 1

    showSlides(slideIndex);

     

    function plusSlides(n) {

     

      showSlides((slideIndex += n));

    }

     

    function currentSlide(n) {

     

      showSlides((slideIndex = n));

    }

     

    function showSlides(n) {

      var i;

      var slides = document.getElementsByClassName("mySlides");

      var dots = document.getElementsByClassName("dot");

      if (n > slides.length) {

        slideIndex = 1;

      }

      if (n < 1) {

        slideIndex = slides.length;

      }

      for (i = 0i < slides.lengthi++) {

        slides[i].style.display = "none";

      }

      for (i = 0i < dots.lengthi++) {

        dots[i].className = dots[i].className.replace(" active""");

      }

      slides[slideIndex - 1].style.display = "block";

      dots[slideIndex - 1].className += " active";

      setInterval(showSlides1000);

    }

     

     

×
×
  • Create New...