How to force code blocks to overflow:auto

  • Author
    Posts
  • #50246

    jreypo
    Member

    Hi. I have observed after activating the theme that code preformatted blocks get wrapped if the text doesn’t fit the size. In other themes I have used this custom css code:

    pre {
    display: block;
    padding: 9.5px;
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.42857143;
    overflow:auto;
    text-align:left;
    color: #333333;
    background-color: #f5f5f5;
    border: 1px solid #cccccc;
    border-radius: 4px;
    }

    But with standard the overflow part doesn’t work.

    Thanks.
    Juanma

    The blog I need help with is jreypo.wordpress.com.

    #50453

    Hi Juanma!

    Can you please send me a link to a page with an example, where this is happening?

    #50454

    jreypo
    Member

    Hi Daniel.

    Thanks for your answer. Take a look at this post, in the second code block.

    http://jreypo.wordpress.com/2013/01/28/linux-kernel-3-7-and-vmware-tools-issue/

    #50485

    Hi!

    If you want to have the text wrap around the code, you can try to add a float to the pre tag styling:

    pre {
        float: left;
    }

The topic ‘How to force code blocks to overflow:auto’ is closed to new replies.