Sunday, August 5, 2012

CSS shit

Yeah, right now I'm working on a pretty shitty problem. I'm trying to make the style for a block of code that I can use here in this blog. However, the overflow-x property doesn't seem to be working correctly. I try to set it to overflow-x: auto, but it still breaks the text. Here is the style (in the code block itself):

.code { font-family: courier; font-size: 10pt; background-color: #ffa; max-width: 40em; max-height: 20em; overflow-x: auto; white-space: pre; margin: 0 auto; }

And here is a test that shows it breaks lines (the text is a single line which contains no linebreaks):

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

No comments:

Post a Comment