From: Tom Hughes Date: Fri, 31 Aug 2012 09:27:45 +0000 (+0100) Subject: Use CSS to centre the images in the key X-Git-Tag: live~5422 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/51f5984c1c7a54feace02f67d48b15a4516d6f64?hp=721aaae7773f381477663be7eb2e6ea49ef581fd Use CSS to centre the images in the key --- diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index e309e2ed7..43eea9ee0 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -497,7 +497,10 @@ h2 { padding-right: 5px; } -#mapkey .mapkey-table-key { +#mapkey .mapkey-table-key img { + display: block; + margin-left: auto; + margin-right: auto; } #mapkey .mapkey-table-value { diff --git a/app/views/site/key.html.erb b/app/views/site/key.html.erb index 294224b18..ed36c0186 100644 --- a/app/views/site/key.html.erb +++ b/app/views/site/key.html.erb @@ -5,7 +5,7 @@ <% data.each do |entry| %> <% if params[:zoom].to_i >= entry['min_zoom'] && params[:zoom].to_i <= entry['max_zoom'] %> - + <%= image_tag "key/#{name}/#{entry['image']}" %>