Hello,
When publishing code samples in HTML5 output, I'm using a combination of "rdoverflow" and Google's "prettyprint".
All works well most of the time; however, sometimes the code samples bleed past the edge of the box: http://support.beanstream.com/#Topic%20 ... iables.htm
Thanks, in advance, for your help,
Brent
PrettyPrint-ed Code bleeding outside of box
-
- Propeller Head
- Posts: 26
- Joined: Fri Nov 22, 2013 6:08 pm
- Location: Victoria, British Columbia, Canada
- Contact:
PrettyPrint-ed Code bleeding outside of box
T. BRENT SCHAUS | Beanstream, A Digital River Company | Technical Writer
p: +1 (250) 984-8712 customer support: +1 888.472.0811 | bschaus@beanstream.com | digitalriver.com
p: +1 (250) 984-8712 customer support: +1 888.472.0811 | bschaus@beanstream.com | digitalriver.com
-
- Propeller Head
- Posts: 56
- Joined: Mon Apr 05, 2010 6:51 pm
- Location: Charleston
- Contact:
Re: PrettyPrint-ed Code bleeding outside of box
Can you give some more details about rdoverflow? Is it just defined in the CSS? I see div elements with that class value wrapping the code samples and I see that the stylesheet defines the overflow behavior for that case.
The behavior is dependent on the browser with a value of auto for overflow. For example, viewing from Google Chrome, I'm seeing the text overflow beyond the box on a single line with scroll bars.
overflow reference on Mozilla Developer Network
Depending on what you want to achieve, you may be able to use CSS. A good starting point may be to review the word-wrap, white-space, and overflow CSS properties. The situation you are encountering in the link you provided is the request and response URLs are each long string of text with no indications of where to break the string to the next line.
Code: Select all
div.rdoverflow
{
overflow: auto;
}
overflow reference on Mozilla Developer Network
Depending on what you want to achieve, you may be able to use CSS. A good starting point may be to review the word-wrap, white-space, and overflow CSS properties. The situation you are encountering in the link you provided is the request and response URLs are each long string of text with no indications of where to break the string to the next line.
-
- Propeller Head
- Posts: 26
- Joined: Fri Nov 22, 2013 6:08 pm
- Location: Victoria, British Columbia, Canada
- Contact:
Re: PrettyPrint-ed Code bleeding outside of box
Hi Thomas,
Thanks for your answer... it was a big help.
To tell the truth, since I'm using prettyprint, I'm not sure how relevant it is for me to keep using rdoverflow.
I've decided to leave it in the stylesheet, but I added a new class:
So far, so good
Brent
Thanks for your answer... it was a big help.
To tell the truth, since I'm using prettyprint, I'm not sure how relevant it is for me to keep using rdoverflow.
I've decided to leave it in the stylesheet, but I added a new class:
Code: Select all
pre.prettyprint
{
overflow: scroll;
}
Brent
T. BRENT SCHAUS | Beanstream, A Digital River Company | Technical Writer
p: +1 (250) 984-8712 customer support: +1 888.472.0811 | bschaus@beanstream.com | digitalriver.com
p: +1 (250) 984-8712 customer support: +1 888.472.0811 | bschaus@beanstream.com | digitalriver.com