col-md-5 col-sm-12没有正确调整大小

时间:2015-01-28 06:10:44

标签: twitter-bootstrap

我正在尝试解决我的列没有正确调整大小的问题。工作正常,直到768px。

非常感谢任何帮助。一直试图解决这个问题。

由于

<div class='row'>
    <div class="container home-container">
        <div class="sidebar col-md-5 col-sm-12 " style="left: 0px;"></div>

        <div class="col-md-7 col-sm-12 col-md-offset-5 main-content">

            <h3 class='recipetitle'>Veggie Hash Ingredients & Recipe</h3>

            <div class='ingredients'><p>2 Yellow Potatoes</p>

                <p>1 Small Bag of Brussel Sprouts</p>

                <p>1 Bunch Lacinato Kale</p>

                <p>2 Tbsp Butter</p>

                <p>½ Shallot</p>

                <p>1 Large Egg</p>

                <p>1 Avocado</p>

                <p>Olive Oil</p>

                <p> Salt & Pepper to taste</p>

            </div>
            <div class='sexyrecipe'>
                <p>There is a breakfast joint in Clayton called Half & Half. Stephanie and I first went there a few months after we moved down to St.
                    Louis. It very quickly became one of our favorite local restaurants, and our favorite place to grab breakfast. This recipe is our
                    adaption of the Veggie Hash they serve. </br></br>

                    Start things off by setting your oven to 350 degrees.
                    After your oven is set you should be putting some water (with a pinch of salt) on to boil. This will be for our potatoes. While
                    your water is coming to a boil, you should be chopping your two potatoes with the skin on. Try to keep them all relatively the
                    same size so they don’t cook at different speeds. Once your water is boiling toss in your potatoes. Keep an eye on them because
                    you don’t want them to get mushy. After 5 minutes check them. If you can stick your fork in them, but there is still a little
                    resistance they are ready. Quickly drain the potatoes and set them aside. </br></br>

                    While your potatoes are boiling away, you should be preparing your brussel sprouts. Take your bruseels out and clean them. I like
                    to remove the outer leaves and trim the stem a little, but you don’t have to. Chop all of your brussels in half and set them on a
                    baking pan. I typically line the pan in tin foil to make clean up easier. Place your brussels on the tray, drizzle with olive oil
                    and add salt and cracked pepper. Place in the oven for 7-10 minutes, or until the brussels start to carmelize. Once they begin to
                    caramelize, take them out and set aside. </br></br>

                    In a large skillet, heat up a splash of olive oil on medium heat. Wait until the oil starts to simmer (it needs to be really hot
                    so the potatoes crisp up on the outside and don’t get greasy) and add the potatoes. Let the potatoes crisp in the oil. What you
                    want are crispy outsides and soft, pillowy insides. Make sure to keep them moving in the pan so most sides are golden
                    brown. </br></br>

                    When your potatoes are brown and crispy, throw in your brussels and your chopped shallot. Add a little more olive oil and keep all
                    your ingredints moving. I like to add a little more salt and pepper here (make sure you season as you cook). </br></br>

                    Once your shallots begin to become transluscent, add your chopped kale and your butter. Cook the kale down until it starts to wilt
                    slightly and turns beautifully green. </br>

                    Once your kale is slightly wilted, take it out of the pan and serve with a fried egg and chopped avocado!</br></br>

                    -To make the perfect fried egg with a gooey yolk, you need to oil your pan, and keep it on medium-low heat. Take a small bowl and
                    crack your egg into it. Pour your egg from the bowl onto the hot pan and let it cook until you see the egg white start to form
                    holes from popped bubbles. Take it out of the pan with a spatula to serve.
                </p>

            </div>
        </div>
    </div>
</div>

1 个答案:

答案 0 :(得分:0)

问题是您在主要内容上使用col-md-offset-5,但同一hirachy级别的侧边栏已经有col-md-5。删除col-md-offset-5,我认为这应该可以解决问题。如果没有,.sidebar.main-content是否有自定义CSS?并将sidebarmain-content包裹到row

例如:

<div class="container home-container">
    <div class="row">
        <div class="sidebar col-md-5 col-sm-12 " style="left: 0px;"></div>

        <div class="col-md-7 col-sm-12 main-content"></div>
    </div>
</div>