# CDN is causing the carousel and header issue

**URL:** <https://forum.freecodecamp.org/t/cdn-is-causing-the-carousel-and-header-issue/420259>\
**Category:** General\
**Created:** [September 12, 2020, 3:53am UTC](https://forum.freecodecamp.org/t/cdn-is-causing-the-carousel-and-header-issue/420259 "2020-09-12T03:53:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![spalisetty](https://avatars.discourse-cdn.com/v4/letter/s/85f322/32.png) [@spalisetty](https://forum.freecodecamp.org/u/spalisetty)\
**Post date:** [September 12, 2020, 3:53am UTC](https://forum.freecodecamp.org/t/cdn-is-causing-the-carousel-and-header-issue/420259/1 "2020-09-12T03:53:33Z")

</div>

Hi,  
I am learning web development out of my passion, I am stuck at bootstrap Carousel. I am able to do proper root cause analysis. I found out that below CDN is causing the issue. If I remove it, my header looks perfect, but the Carousel images come one below the other. If I leave it on, the header unordered lists start from the center of the header but the carousel works. Here is my complete code Below that it the CDN.

```auto

<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="bootstrap.css">>
  <link rel="stylesheet" href="bootstrap.min.css">
  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">
  <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js" integrity="sha384-B4gt1jrGC7Jh4AgTPSdUtOBvfO8shuf57BaghqFfPlYxofvL8/KUEfYiJOMMV+rV" crossorigin="anonymous"></script>
  <style>

  .navbar{
    background-color: black;
    font-size: 20px;
    padding-top: 10px;
    margin: 0;
    margin-top: -20px;
    margin-left: -5px;
    margin-bottom: -5px;
  }
  .navbar-brand{
    float: left;
  }
  .form-control{
    border-radius: 10px;
    margin-top: 9px;
    width: 250px;
  }
.navbar-brand{
  font-size: 30px;
}
.carousel-inner img {
width: 100%;
height: 100%;
margin-bottom: 50px;
}
.box{
  border: 30px solid white;
  background: orange;
  height: 300px;
  width: 300px;
  margin:auto;
}
#recent1{
  text-align: center;
}
#best1{
  text-align: center;
}
.col-lg-3{
  text-align: center;
}
.carousel-inner{
  width: 100%;
  height: 100%;
}
</style>
</head>
<body>

  <nav class="navbar navbar-default">
                  <div class="navbar-header">
                        <a href="#" class=navbar-brand>SP</a>
                  </div>
                  <ul class="nav navbar-nav">
                      <li id="Telugu"><a href="#"> Telugu Movies </a></li>
                      <li id="Hindi"><a href="#"> Hindi Movies </a></li>
                      <li id="English"><a href="#"> English Movies </a></li>
                  </ul>
                  <ul class="nav navbar-nav navbar-right">
                      <li><input class="form-control" type="text" placeholder="Search" aria-label="Search"></li>
                      <li><a href="file:///C:/Users/spali/OneDrive/Documents/new%20laptop/HTML_Learn/BootStrap/website/ContactUs.html"> Contact Us </a></li>
                  </ul>
  </nav>

  <div class="container">
  <div id="demo" class="carousel slide" data-ride="carousel" data-interval="3000">

  <ul class="carousel-indicators">
    <li data-target="#demo" data-slide-to="0" class="active"></li>
    <li data-target="#demo" data-slide-to="1"></li>
    <li data-target="#demo" data-slide-to="2"></li>
  </ul>

  <div class="carousel-inner">
    <div class="carousel-item active">
      <img src="TeluguMovies.JPG" alt="TeluguMovies" width="1100" height="300">
    </div>
    <div class="carousel-item">
      <img src="HindiMovies.jpg" alt="HindiMovies" width="1100" height="500">
    </div>
    <div class="carousel-item">
      <img src="EnglishMovies.jpg" alt="EnglishMovies" width="1100" height="500">
    </div>
  </div>

  <a class="carousel-control-prev" href="#demo" data-slide="prev">
    <span class="carousel-control-prev-icon"></span>
  </a>
  <a class="carousel-control-next" href="#demo" data-slide="next">
    <span class="carousel-control-next-icon"></span>
  </a>
</div>
</div>

<div class="container">
<h1 id="recent1">Recently Added</h1>
<div class="row" >
  <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12 box">Element - 1</div>
  <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12 box">Element - 2</div>
  <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12 box">Element - 3</div>
  <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12 box">Element - 3</div>
</div>
</div>

<div class="container">
<h1 id="recent1">Recently Added</h1>
<div class="row" >
  <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12 box">Element - 1</div>
  <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12 box">Element - 2</div>
  <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12 box">Element - 3</div>
  <div class="col-lg-3 col-md-4 col-sm-6 col-xs-12 box">Element - 3</div>
</div>
</div>
</body>
</html>

```

CDN below is causing the issue. Please let me know if there is an alternate thing I can do. I am using bootstrap.css v3.4.1

```auto

  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" integrity="sha384-JcKb8q3iqJ61gNV9KGb8thSsNjpSL0n8PARn9HuZOnIxN0hoP+VmmDGMN5t9UJ0Z" crossorigin="anonymous">

```

---

<div class="post-metadata">

**Author:** ![miku86](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/miku86/32/95580_2.png) [@miku86](https://forum.freecodecamp.org/u/miku86)\
**Post date:** [September 12, 2020, 6:21am UTC](https://forum.freecodecamp.org/t/cdn-is-causing-the-carousel-and-header-issue/420259/2 "2020-09-12T06:21:10Z")

</div>

Hey there,

it would be awesome to see your code in action,  
e.g. as a project on codepen:

> **[CodePen Project Editor](https://codepen.io/project/editor)**
>
> ...

You can simply add an `index.html` to the `Project Root`-section and put your code there.

Looking forward to seeing it!

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [June 1, 2021, 6:41pm UTC](https://forum.freecodecamp.org/t/cdn-is-causing-the-carousel-and-header-issue/420259/3 "2021-06-01T18:41:00Z")

</div>

Closed on June 1, 2021, 6:41pm UTC


