0
我試圖把我的搜索框就像上面的鏈接中心,但補充說:ALIGN =>「中心」顯然是錯誤的......這裏就是我有...如何將我的搜索框與中心對齊?
<h2 align="center"><%= link_to "List by Topic", topics_path %></h2>
<h2 align="center"><%= link_to "List by Organisation", hospitals_path %></h2>
<h2 align="center"><%= link_to "List by Country", countries_path %></h2>
<h2 align="center"><%= link_to "List by Specialty", specialties_path %></h2>
<%= form_tag guidelines_path, :class => 'navbar-search',:onSubmit=>"clearText(this)",:method => :get do %>
<%= text_field_tag :search, params[:search], :class => 'search-query input-medium', :placeholder=>"Search", :ONFOCUS=>"clearDefault(this)" %>
<% end %>
使用:樣式= 「文本對齊:中心;」在標籤 – Ian 2013-04-29 23:55:02
Ew中,請勿使用內聯樣式。這使得編輯成爲一場噩夢。樣式進入樣式表,HTML進入HTML文件,Javascript進入JS文件,一切都很容易移動和編輯。 – 2013-04-30 00:01:03
是的,你是對的。我正在嘗試在樣式表中執行此操作,但無法使框變爲空格。當然,文本對齊不會影響實際的搜索框本身? – tessad 2013-04-30 00:07:44