如何在HTML / css / bootstrap 3中保持表格元素与标题上的文字内联?

时间:2014-04-28 21:57:28

标签: html css forms twitter-bootstrap-3

我在HTML / css模板中使用bootstrap3; 以下是我的网页的外观:enter image description here

我希望星标与标题内嵌(即文本旁边)。 明星是按钮,点击表格后提交。 到目前为止,这是我的html代码:

<div class="col-6 col-sm-6 col-lg-4">
  <h3>2004 Toyota Prius $7000 
   <form action="/post/unbookmark/" method="POST"> 
      <input type='hidden' name='csrfmiddlewaretoken' value='ME7CDsBM2mPw2uWSyV28rgQMbE5bEDG2' />
       <input type="hidden" name="bookmark_id" value="1839" />
       <button type="submit" class="bookmark" id="1839" ><span class= "glyphicon glyphicon-star">  </span>    </button>
    </form>
   </h3>
        <p><small>hello, i&#39;m selling 2004 toyota prius with 120k miles. with clear title 44-50 mpg really good on gas ! keyless ... </small></p>
         <p>
          <a class="btn btn-default" href="/search/1839/detail/" role="button">View details &raquo;</a>       
         </p>

1 个答案:

答案 0 :(得分:1)

这适用于我使用Bootstrap 3.如果这对您不起作用,请检查您的bookmark课程

<div class="col-6 col-sm-6 col-lg-4">
    <form action="/post/unbookmark/" method="POST"> 
        <h3>2004 Toyota Prius $7000 <button type="submit" class="bookmark" id="1839"><span class="glyphicon glyphicon-star"></span></button></h3>
        <input type='hidden' name='csrfmiddlewaretoken' value='ME7CDsBM2mPw2uWSyV28rgQMbE5bEDG2' />
        <input type="hidden" name="bookmark_id" value="1839" />
    </form>
    <p><small>hello, i&#39;m selling 2004 toyota prius with 120k miles. with clear title 44-50 mpg really good on gas ! keyless ... </small></p>
    <p><a class="btn btn-default" href="/search/1839/detail/" role="button">View details &raquo;</a></p>
</p>