如何在不丟失標題部分的情況下定位div?比方說,我有這樣的代碼:在HTML中定位DIV
<div class="row featurette" id="Feeding">
<div class="col-md-7">
<h2 class="featurette-heading">1. Transformational Feeding </h2>
<p class="lead text-justify">As TransDev provides supplemental feeding (lunch three times per week) to undernourished school children, the mothers of the participating children are encouraged to plant vegetables to ensure availability of food on the table. With the increase in price of commodities, food production, will provide an additional income for the family.</p>
</div>
<div class="col-md-5">
<img class="featurette-image img-responsive" src="contents/gallery/7.jpg" alt="Generic placeholder image">
</div>
</div>
和按鈕:
<a class="btn btn-warning" href="index.php?pl1=about#Feeding" role="button">Learn more</a>
但每當我按一下按鈕,它看起來像這樣:
當它應該看起來像這樣:
所以也許這是我的navbar
混亂的內容?是我可以用css修復的東西嗎?我試着把ID放在<h2>
上,但結果是一樣的。
也提供了css代碼,就像cod-md-5 –
well col-md-5是bootstrap css文件的一部分。它只是將頁面分成多列。我相信它不需要那樣做。 –
你可以創建一個jsfiddle嗎? –