From 48fb20f5407ce8905755d91149dc7f8c7915c6d0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Mon, 1 Oct 2007 16:46:46 +0000 Subject: [PATCH] Fixed TOC positionning in wiki pages. git-svn-id: http://redmine.rubyforge.org/svn/trunk@791 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/redmine/wiki_formatting.rb | 1 + public/stylesheets/application.css | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/redmine/wiki_formatting.rb b/lib/redmine/wiki_formatting.rb index c5d4253f0..6f2aea0ae 100644 --- a/lib/redmine/wiki_formatting.rb +++ b/lib/redmine/wiki_formatting.rb @@ -60,6 +60,7 @@ module Redmine text.gsub!(/

\{\{([<>]?)toc\}\}<\/p>/i) do div_class = 'toc' div_class << ' right' if $1 == '>' + div_class << ' left' if $1 == '<' out = "

" @toc.each_with_index do |heading, index| # remove wiki links from the item diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 2eef7ffe3..d31e3a320 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -310,14 +310,12 @@ div.wiki div.toc { line-height: 1.2em; margin-bottom: 12px; margin-right: 12px; - float: left; + display: table } +* html div.wiki div.toc { width: 50%; } /* IE6 doesn't autosize div */ -div.wiki div.toc.right { - float: right; - margin-left: 12px; - margin-right: 0; -} +div.wiki div.toc.right { float: right; margin-left: 12px; margin-right: 0; width: auto; } +div.wiki div.toc.left { float: left; margin-right: 12px; margin-left: 0; width: auto; } div.wiki div.toc a { display: block; -- 2.39.5