diff --git a/phpBB/styles/prosilver/template/bbcode.html b/phpBB/styles/prosilver/template/bbcode.html
index c0c0a2da46..460d102c28 100644
--- a/phpBB/styles/prosilver/template/bbcode.html
+++ b/phpBB/styles/prosilver/template/bbcode.html
@@ -12,8 +12,8 @@
-- {L_CODE}{L_COLON} {L_SELECT_ALL_CODE}
-
+- {L_CODE}{L_COLON} {L_SELECT_ALL_CODE}
+
diff --git a/phpBB/styles/prosilver/template/forum_fn.js b/phpBB/styles/prosilver/template/forum_fn.js
index eccb12e827..42a68a2ef5 100644
--- a/phpBB/styles/prosilver/template/forum_fn.js
+++ b/phpBB/styles/prosilver/template/forum_fn.js
@@ -187,7 +187,7 @@ function displayBlocks(c, e, t) {
function selectCode(a) {
// Get ID of code block
- var e = a.parentNode.parentNode.getElementsByTagName('CODE')[0];
+ var e = a.parentNode.parentNode.getElementsByTagName('PRE')[0];
var s, r;
// Not IE and IE9+
@@ -205,7 +205,8 @@ function selectCode(a) {
}
r = document.createRange();
- r.selectNodeContents(e);
+ r.setStart(e.firstChild, 0);
+ r.setEnd(e.lastChild, e.lastChild.textContent.length);
s.removeAllRanges();
s.addRange(r);
}
diff --git a/phpBB/styles/prosilver/theme/colours.css b/phpBB/styles/prosilver/theme/colours.css
index 7d0462be1b..801d607d9c 100644
--- a/phpBB/styles/prosilver/theme/colours.css
+++ b/phpBB/styles/prosilver/theme/colours.css
@@ -479,7 +479,7 @@ dl.codebox dt {
border-bottom-color: #CCCCCC;
}
-dl.codebox code {
+dl.codebox pre {
color: #2E8B57;
}
diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css
index 4b8c972697..0cab12910b 100644
--- a/phpBB/styles/prosilver/theme/content.css
+++ b/phpBB/styles/prosilver/theme/content.css
@@ -491,7 +491,7 @@ blockquote dl.codebox {
margin-left: 0;
}
-dl.codebox code {
+dl.codebox pre {
/* Also see tweaks.css */
overflow: auto;
display: block;
diff --git a/phpBB/styles/subsilver2/template/bbcode.html b/phpBB/styles/subsilver2/template/bbcode.html
index efcf5e1acb..5558716cad 100644
--- a/phpBB/styles/subsilver2/template/bbcode.html
+++ b/phpBB/styles/subsilver2/template/bbcode.html
@@ -21,11 +21,11 @@
-{L_CODE}{L_COLON}
+