Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/styles/default.min.css">
    <style>
        /* for block of numbers */
        
        .hljs-ln-numbers {
            -webkit-touch-callout: none;
            -webkit-user-select: none;
            -khtml-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            text-align: center;
            color: #ccc;
            border-right: 1px solid #CCC;
            vertical-align: top;
            padding-right: 5px;
            /* your custom style here */
        }
        /* for block of code */
        
        .hljs-ln-code {
            padding-left: 10px;
        }
    </style>
</head>
<body>
    <main>
        <h1>This is a sample document</h1>
        <p>This will display the alignment issues</p>
        <pre><code>
            fn main() {
                println!("Hello, World!");
                if(true) {
                    println!("It is me!");
                }
            }
        </code></pre>
    </main>
</body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.4.0/languages/rust.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlightjs-line-numbers.js/2.8.0/highlightjs-line-numbers.min.js"></script>
<script>
    hljs.highlightAll();
    //hljs.initLineNumbersOnLoad();
</script>
</html>
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
wcoderpro
0viewers