css: fix positioning of search button in tag search box.

Fixes the search button wrapping to the next line in Firefox. Also fixes
the search box to be full width with no gap between the search box and
the search button.
This commit is contained in:
evazion
2019-09-19 14:20:47 -05:00
parent bf51d68f15
commit 9720e4cfa9
4 changed files with 14 additions and 17 deletions

View File

@@ -32,20 +32,6 @@ div#page {
list-style-type: none;
}
input[type=text] {
/* ensure expanded search box renders above post thumbnails. */
z-index: 1;
position: relative;
}
button[type=submit] {
padding: 2px 6px;
}
#search-box button[type=submit] {
border-left: none;
}
#options-box i.fa-bookmark {
margin-right: 0.25em;
}

View File

@@ -279,6 +279,16 @@ div#c-posts {
margin-left: 1em;
}
#search-box-form {
display: flex;
#search-box-submit {
padding: 2px 6px;
border-left: none;
border-radius: 0px;
}
}
div#a-index {
menu#post-sections {
margin-bottom: 0.5em;

View File

@@ -33,7 +33,7 @@
padding: 5px;
input#tags {
width: 80%;
min-width: 0px;
}
button[type=submit] {

View File

@@ -2,14 +2,15 @@
<section id="search-box">
<h1>Search</h1>
<%= form_tag(path, :method => "get") do %>
<%= form_tag(path, method: "get", id: "search-box-form") do %>
<% if params[:raw] %>
<%= hidden_field_tag :raw, params[:raw] %>
<% end %>
<% if params[:random] %>
<%= hidden_field_tag :random, params[:random] %>
<% end %>
<%= text_field_tag("tags", tags, :id => tags_dom_id, :"data-shortcut" => "q", :"data-autocomplete" => "tag-query") %><%= content_tag "button", content_tag("i", nil, class: "fas fa-search"), type: "submit" %>
<%= text_field_tag("tags", tags, :id => tags_dom_id, :"data-shortcut" => "q", :"data-autocomplete" => "tag-query") %>
<button id="search-box-submit" type="submit"><i class="fas fa-search"></i></button>
<%= hidden_field_tag "ms", "1" %>
<% end %>
</section>