aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/styles/prosilver/template/forum_fn.js25
-rw-r--r--phpBB/styles/prosilver/theme/common.css4
-rw-r--r--phpBB/styles/prosilver/theme/content.css1
3 files changed, 30 insertions, 0 deletions
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index 0da3c77d53..23dfae9fab 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -451,6 +451,31 @@ function toggle_dropdown()
options.dropdown.toggle();
parent.toggleClass(options.visibleClass, !visible).toggleClass('dropdown-visible', !visible);
+
+ // Check dimensions when showing dropdown
+ // !visible because variable shows state of dropdown before it was toggled
+ if (!visible) {
+ options.dropdown.find('.dropdown-contents').each(function() {
+ var $this = $(this),
+ windowWidth = $(window).width();
+
+ $this.css({
+ marginLeft: 0,
+ left: 0,
+ maxWidth: (windowWidth - 4) + 'px'
+ });
+
+ var offset = $this.offset().left,
+ width = $this.outerWidth(true);
+
+ if (offset < 2) {
+ $this.css('left', (2 - offset) + 'px');
+ }
+ else if ((offset + width + 2) > windowWidth) {
+ $this.css('margin-left', (windowWidth - offset - width - 2) + 'px');
+ }
+ });
+ }
}
/**
diff --git a/phpBB/styles/prosilver/theme/common.css b/phpBB/styles/prosilver/theme/common.css
index 9e15eada22..bc2432e2a4 100644
--- a/phpBB/styles/prosilver/theme/common.css
+++ b/phpBB/styles/prosilver/theme/common.css
@@ -510,6 +510,10 @@ ul.linklist.bulletin li.no-bulletin:before {
border: 1px solid transparent;
border-radius: 5px;
padding: 5px;
+ position: relative;
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
}
.dropdown li {
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css
index ad6f27665d..389f93fa4e 100644
--- a/phpBB/styles/prosilver/theme/content.css
+++ b/phpBB/styles/prosilver/theme/content.css
@@ -516,6 +516,7 @@ blockquote .codebox {
padding: 6px;
border: 1px dashed transparent;
clear: left;
+ -webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}