0

Hi I recently created a few pages on Bootply.com and tried transferring them over to the website I am creating in Visual Studios, however, the styling ends up malformed and does not look like the way it looks on Bootply.com. Here are a few pictures:

On Bootply:

enter image description here

On Visual Studios:

enter image description here

I developed it on Bootply using Bootstrap 2.3.2 and I downloaded Boostrap from this site: http://getbootstrap.com/2.3.2/, which is the 2.3.2 version, so I don't see why there should be any difference if I just copy and paste what I created on Bootply into by tag on Visual Studios. This descrepancy is not caused by a difference in the image used because on Bootply whatever image I use, it scales to fill the carousel and the menu appears inside the image as opposed to on top of it.

Here is the html for my page, maybe I added something that's throwing bootstrap off:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HomeTest.aspx.cs" Inherits="HomeTest" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <title>Home</title>

    <!-- Bootstrap -->
    <link href="Styles/css/bootstrap.min.css" rel="stylesheet">
 <link href="Styles/css/home.css" rel="stylesheet" />
 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
 <script src="Styles/js/bootstrap.min.js"></script>

    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
    <!-- NAVBAR
    =================== -->
    <div class="navbar-wrapper">
      <!-- Wrap the .navbar in .container to center it within the absolutely positioned parent. -->
      <div class="container">

        <div class="navbar navbar-inverse">
          <div class="navbar-inner">
            <!-- Responsive Navbar Part 1: Button for triggering responsive navbar (not covered in tutorial). Include responsive CSS to utilize. -->
            <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <a class="brand" href="#">Brand</a>
            <!-- Responsive Navbar Part 2: Place all navbar contents you want collapsed withing .navbar-collapse.collapse. -->
            <div class="nav-collapse collapse">
              <ul class="nav">
                <li class="active"><a href="#">Home</a></li>
                <li><a href="#about">Log In</a></li>
                <li><a href="#contact">About</a></li>
                <!-- Read about Bootstrap dropdowns at http://twitter.github.com/bootstrap/javascript.html#dropdowns -->
                <li class="dropdown">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
                  <ul class="dropdown-menu">
                    <li><a href="#">Action</a></li>
                    <li><a href="#">Another action</a></li>
                    <li><a href="#">Something else here</a></li>
                    <li class="divider"></li>
                    <li class="nav-header">Nav header</li>
                    <li><a href="#">Separated link</a></li>
                    <li><a href="#">One more separated link</a></li>
                  </ul>
                </li>
              </ul>
            </div><!--/.nav-collapse -->
          </div><!-- /.navbar-inner -->
        </div><!-- /.navbar -->

      </div> <!-- /.container -->
    </div><!-- /.navbar-wrapper -->



    <!-- Carousel
    ================================================== -->
    <div id="myCarousel" class="carousel slide" data-ride="carousel">
      <div class="carousel-indicators">
        <ol>
          <li data-target="#myCarousel" data-slide-to="0" class="active"></li>
          <li data-target="#myCarousel" data-slide-to="1"></li>
          <li data-target="#myCarousel" data-slide-to="2"></li>
        </ol>
      </div>
      <div class="carousel-inner">
        <div class="item active">
          <img src="http://lorempixel.com/1280/1024/technics">
          <div class="container center center-vertical">
            <div class="carousel-caption center center-text">
              <h1 style="font-size:60px">Welcome!</h1>
              <p class="lead" style="font-size:32px">Once upon a time there was....</p>
              <a class="btn btn-large btn-primary center-block" href="#">Sign up today</a>
              <a class="btn btn-large" style="background-color:transparent">Donate!</a>
            </div>
          </div>
        </div>
        <div class="item">
          <img src="http://lorempixel.com/1280/1024/technics" alt="">
          <div class="container">
            <div class="carousel-caption">
              <h1>Another example headline.</h1>
              <p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
              <a class="btn btn-large btn-primary" href="#">Learn more</a>
              <a class="btn btn-large" style="background-color:transparent">Donate!</a>
            </div>
          </div>
        </div>
        <div class="item">
          <img src="http://lorempixel.com/1280/1024/abstract" alt="">
          <div class="container">
            <div class="carousel-caption">
              <h1>One more for good measure.</h1>
              <p class="lead">Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
              <a class="btn btn-large btn-primary" href="#">Browse gallery</a>
              <a class="btn btn-large" style="background-color:transparent">Donate!</a>
            </div>
          </div>
        </div>
      </div>
      <a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
      <a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
    </div><!-- /.carousel -->
    </body>
Xigaphactus
  • 37
  • 1
  • 6
  • Does the website look malformed after it's deployed, or only in Visual Studio? – Obsidian Age Aug 27 '17 at 22:10
  • I ran it on a localhost. The picture above is how the site looks in my browser using the localhost. – Xigaphactus Aug 27 '17 at 22:12
  • @LawrenceCherone Yes, I am using the bootstrap.min.css – Xigaphactus Aug 27 '17 at 22:13
  • If it helps I added the html for my page up above. Everything within the tag I copy and pasted from Bootply. – Xigaphactus Aug 27 '17 at 22:24
  • Try holding down `SHIFT` while clicking the refresh icon in your browser. That will force the cache to reload. Then ensure that your two CSS files are in a folder called `css`, which is in itself in a folder called `Styles`. You're also using a **very** outdated version of jQuery, which may be causing conflict. Bootstrap usually requires version `1.9.1` or higher of jQuery, though it may be higher depending on which Bootstrap version you're running -- check your F12 developer tools to see if the console is complaining about that. – Obsidian Age Aug 27 '17 at 22:29
  • @ObsidianAge Refreshing the browser with shift and updating JQuery didn't work (3.2.1). My css files are under folders Css and Styles. – Xigaphactus Aug 27 '17 at 22:37

1 Answers1

0

Bootply generates a separate .css file in addition to the .css files that are part of bootstrap. Incorporating this additional .css file into my project allowed it to work.

Xigaphactus
  • 37
  • 1
  • 6