Roman Matveev
Roman Matveev

Reputation: 577

Bootstrap is not working on my code

It looks like I miss some stupid bug, but I checked the code many times: looks like everything done in acording to the docs. I downloaded the latest (3.0.3) bootstrap version one more time... But the page looks plain (with no Bootstrap styling):

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="templates/bootstrap/css/bootstrap.min.css">
    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script src="templates/bootstrap/js/bootstrap.min.js"></script>
    <title>Page title</title>
  </head>
  <body>

    <a href='#' class='btn'>Скачать</a><br />
    <div class="pagination">
      <ul>
        <li><a href='#'>1</a></li>
        <li><a href='#'>2</a></li>
        <li><a href='#'>3</a></li>
        <li><a href='#'>4</a></li>
        <li><a href='#'>5</a></li>
        <li><a href='#'>6</a></li>
        <li><a href='#'>7</a></li>
        <li><a href='#'>8</a></li>
      </ul>
    </div>

  </body>
</html>

Can anyone point me to my mistake?

Upvotes: 0

Views: 125

Answers (3)

Tepken Vannkorn
Tepken Vannkorn

Reputation: 9723

According to documentation of Bootstrap 3, you have to put btn-default along with the btn class.

http://getbootstrap.com/getting-started/

So your code would rather be <a href='#' class='btn btn-default'>Скачать</a>

Regarding to pagination, you have got to put class="pagination" to ul not its parent div.

<ul class="pagination">
    <li><a href='#'>1</a></li>
    <li><a href='#'>2</a></li>
    <li><a href='#'>3</a></li>
    <li><a href='#'>4</a></li>
    <li><a href='#'>5</a></li>
    <li><a href='#'>6</a></li>
    <li><a href='#'>7</a></li>
    <li><a href='#'>8</a></li>
  </ul>

Upvotes: 4

user3128788
user3128788

Reputation: 21

<ul class="pagination">
<li><a href='#'>1</a></li>
<li><a href='#'>2</a></li>
<li><a href='#'>3</a></li>
<li><a href='#'>4</a></li>
<li><a href='#'>5</a></li>
<li><a href='#'>6</a></li>
<li><a href='#'>7</a></li>
<li><a href='#'>8</a></li>

is wrong

it must be

<ul class="pagination">

  • «
  • 1
  • 2
  • 3
  • 4
  • 5
  • »
  • the href must be "" and not ''

    Upvotes: 0

    Tieson T.
    Tieson T.

    Reputation: 21246

    You need to include the viewport meta tag if you want a responsive layout:

    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    

    Also, if you're using the default download, you also need to include the theme CSS file.

    <link rel="stylesheet" href="path/to/the/bootstrap-theme.min.css" />
    

    Upvotes: 1

    Related Questions