Change the attribute for overflow of the relevant class to like:
.post {overflow:scroll;}
Thanks man but it changes whole post and a scroll appears, but in RSS feeds it doesnot.
I require scroll only to appear where I have entered text in between backtricks and not in the whole post.
Besides overflow firefox displays the links in one line but IE7 breaks it into more than one line, why is that?
try this then:
.post code {overflow:scroll;}
WP-Chunk ported to bbPress, inserts a break into long links so they wrap:
https://bbpress.org/forums/topic/limit-long-words#post-9648
This is not what I meant, haven’t you seen phpbb3 that sort of thing, scrollbar only under
and hyper links are not active in that box.
please people suggest.
Got it somewhat.
Edit style.css file in themes and enter
1)To align text both sides
.post {text-align: justify;}
2)To prevent overflow
.post code {
overflow: auto;
display: block;
height: auto;
max-height: 200px;
white-space: normal;
padding-top: 5px;
padding-bottom: 5px;
font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
line-height: 1.3em;
background: #ffffff;
margin: 2px 0;
}
Sill one more thing – how to remove hyperlink in the text entered. That is why <a href="
etc gets added to text I enter between code tag.
Can you just use CSS to style links so they look just like your text.? If so, something like this might work (obviously modify this as appropriate for your theme):
.post code a, .post code a:link, .post code a:visited {
color: #9c0;
text-decoration: none;
font-size: 8pt;
font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
color: #000;
}
I don’t want my text that i enter between
to be trated as hyperlink even if it is. What @bobbyh say will only change the formatting but not remove hyperlink.
joneywalker4u, to remove the hyperlinkification of URLs for text inside of code tags, you could write a plugin that removes the filter that hyperlinkifies URLs for the entire post, and then create a new filter that splits the post into strings-enclosed-by-code-tags and strings-not-enclosed-by-code-tags, apply the filter that hyperlinkifies URLs to the strings-not-enclosed-by-code-tags, and then glue the strings together.
This is totally doable, but it seems like a lot of work, which is why I suggested the CSS approach…
It would be easier to disable the auto-link entirely for a post when is detected than to parse it out, if that will do. Somehow I missed the original question was scrolling on code, sorry about that but as you found it’s very simple CSS.
Disabling auto-link is something like: (untested)
remove_filter('post_text', 'make_clickable');
add_filter('post_text', 'make_clickable_if_not_code');
function make_clickable_if_not_code($text) {
if (strpos($text,'<code>')===false) {return make_clickable($text);}
return $text;
}
[code] is detected than to parse it out, if that will do. Somehow I missed the original question was scrolling on code, sorry about that but as you found it’s very simple CSS.
Disabling auto-link is something like: (untested)
remove_filter('post_text', 'make_clickable');
add_filter('post_text', 'make_clickable_if_not_code');
function make_clickable_if_not_code($text) {
if (strpos($text,'<code>')===false) {return make_clickable($text);}
return $text;
}