Stephen__T
Stephen__T

Reputation: 2032

Twitter bootstrap is not being very responsive

I thought I would give twitter bootstrap a try and I came up with the following layout.

<!doctype html>
<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="css/bootstrap-responsive.css" rel="stylesheet">
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">
    <title></title>
</head>
<body>
    <div id="header" class="container">
        <div class="row">
            <div class="span1" style="background-color: yellow; height:50px;">
            </div>
            <div class="span1" style="background-color: yellow; height:50px;">
            </div>
            <div class="span1" style="background-color: yellow; height:50px;">
            </div>
            <div class="span1" style="background-color: yellow; height:50px;">
            </div>
            <div class="span1" style="background-color: yellow; height:50px;">
            </div>
            <div class="span1" style="background-color: yellow; height:50px;">
            </div>
            <div class="span1" style="background-color: yellow; height:50px;">
            </div>
            <div class="span1" style="background-color: yellow; height:50px;">
            </div>
            <div class="span1" style="background-color: yellow; height:50px;">
            </div>
            <div class="span1" style="background-color: yellow; height:50px;">
            </div>
            <div class="span1" style="background-color: yellow; height:50px;">
            </div>
            <div class="span1" style="background-color: yellow; height:50px;">
            </div>

        </div>
    </div>

    <div id="main" class="container">
        <div class="row">
            <div class="span3" style="background-color: red; height:100px;">
            </div>
            <div class="span9" style="background-color: blue; height:100px;">
                <div class="row">
                    <div class="span3" style="background-color: orange; height:50px;">
                    </div>
                    <div class="span3" style="background-color: orange; height:50px;">
                    </div>
                    <div class="span3" style="background-color: orange; height:50px;">
                </div>
            </div>
            </div>
        </div>
    </div>

    <div id="footer" class="container">
        <div class="row">
            <div class="span12" style="background-color: green; height:50px;">
            </div>
        </div>
    </div>

    <script src="http://code.jquery.com/jquery-latest.js"></script>
    <script src="js/bootstrap.min.js"></script>
</body>
</html>

From what I've read the columns should stack once the viewport width is less than 767px. I can't get it to work in Chrome.

Upvotes: 0

Views: 450

Answers (2)

Coderapper
Coderapper

Reputation: 153

Yes.you have to include you custom CSS files after bootstrap files

Upvotes: 0

Stephen__T
Stephen__T

Reputation: 2032

I figured it out. I just have to change the order of the style sheets.

<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-responsive.css" rel="stylesheet">

Upvotes: 3

Related Questions