From 6e7eca1d7fd819db781d93a0e02ec3ce9f1a8566 Mon Sep 17 00:00:00 2001 From: kordan Date: Thu, 21 Feb 2013 18:11:32 +0100 Subject: [PATCH] MDL-38052 theme_formal_white: allowed the overlap between headermenu and header logo --- theme/formal_white/lib.php | 6 +++--- theme/formal_white/style/formal_white.css | 21 +++++++++++++++------ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/theme/formal_white/lib.php b/theme/formal_white/lib.php index 27d10ba661f..c9cd2103407 100644 --- a/theme/formal_white/lib.php +++ b/theme/formal_white/lib.php @@ -102,9 +102,9 @@ function formal_white_set_framemargin($css, $framemargin) { $tag = '[[setting:framemargin]]'; $css = str_replace($tag, $framemargin.'px', $css); - // Set .headermenu right - $calculated = $framemargin + 17; // 17px is the width of the frame - $tag = '[[calculated:headermenuright]]'; + // Set .headermenu margin + $calculated = $framemargin + 22; // 17px is the width of the frame; 5px to avoid to have all stuck + $tag = '[[calculated:headermenumargin]]'; $css = str_replace($tag, $calculated.'px', $css); return $css; diff --git a/theme/formal_white/style/formal_white.css b/theme/formal_white/style/formal_white.css index ec66538781d..9bdcfa1639a 100644 --- a/theme/formal_white/style/formal_white.css +++ b/theme/formal_white/style/formal_white.css @@ -39,6 +39,7 @@ h2.main, h3.main, h4.main {margin:1em;padding:0;text-align:center;} margin: 0; padding: 0; width: auto; + line-height: 0; } .dir-rtl #headerlogo { @@ -47,20 +48,28 @@ h2.main, h3.main, h4.main {margin:1em;padding:0;text-align:center;} /* headermenu */ .headermenu { - float: right; font-size: 90%; line-height: 1.7em; - margin: 0.5em; - position: relative; - right: 0; - text-align: right; + position: absolute; top: 0; } + +.dir-ltr .headermenu { + float: right; + margin: 1.7em [[calculated:headermenumargin]] 0 0; + right: 0; + text-align: right; + } + .dir-rtl .headermenu { float: left; + margin: 1.7em 0 0 [[calculated:headermenumargin]]; + left: 0; + text-align: left; } + .langmenu { - margin-right: 0.4em + margin-right: 0.1em; } #dock {background-color:[[setting:blockcontentbgc]];border-right:1px dashed #000;}