Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you want to do this with css, you'll probably need to change your markup a little. See the following fiddle, which does what you want: <a href="http://jsfiddle.net/97BwC/1/" rel="nofollow">http://jsfiddle.net/97BwC/1/</a></p> <p>The revised Markup:</p> <pre><code>&lt;div id="search" style=""class="container-fluid"&gt; &lt;div id="searchInputWrapper" style=""&gt; &lt;input type="text" style=""&gt; &lt;a id="showSearchBox" href="#" style="height:20px"&gt; &lt;span class="caret" style="vertical-align:middle; height:100%"&gt; &lt;/span&gt; &lt;/a&gt; &lt;/input&gt; &lt;/div&gt; &lt;div id='gmailSearchBox' class="gmailSearchBox" style=""&gt; &lt;form action="" method="post"&gt;From: &lt;input type="text" id="fromDate"&gt; &lt;br/&gt;To: &lt;input type="text" id="toDate"&gt; &lt;br/&gt;Type: &lt;select id="logType"&gt; &lt;option&gt;--Select Type--&lt;/option&gt; &lt;/select&gt; &lt;br/&gt;Text: &lt;input type="text" id="searchText"&gt; &lt;br/&gt; &lt;input type="submit" class="btn btn-primary"&gt; &lt;/form&gt; &lt;/div&gt; </code></pre> <p> </p> <p>The css:</p> <pre><code> #search { position:relative; border:1px solid grey; border-radius:3px; max-width:300px; padding-right:0px; padding-left:0px; } #searchInputWrapper { left:0px; right:20px; line-height:inherit; float:left; width:100%; } #searchInputWrapper input { border:none; width:95%; line-height:inherit; padding:0px 0px 0px 0px; } #gmailSearchBox { position:absolute; bottom:-212px; right:0; display:none; border:1px solid grey; background-color:#fff; } </code></pre> <p><strong>Update:</strong></p> <p>If the height of the search box isn't static, you can use javascript to set the bottom offset. Here's an updated fiddle: <a href="http://jsfiddle.net/GPTJ4/2/" rel="nofollow">http://jsfiddle.net/GPTJ4/2/</a></p> <p>And here's the revised handler:</p> <pre><code>$('#showSearchBox').click(showSearchBox); function showSearchBox() { var height = 0, $searchBox = $('#gmailSearchBox'); $searchBox.css({display:'block'}); //get the height of the search box height = $searchBox.height(); //set the offset equal to the height $searchBox.css({bottom:-height +'px'}); } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload