I have seen many websites with code blocks on my cellphone, but only a few were responsive. If the code lines were to long I couldn't see the rest of the code. I am also now developing a website with code in. How can I make the code blocks responsive? Here is my code.
pre {
width: 70%;
font-family: 'Courier New', Courier, monospace;
background-color: #b3b3b3;
color: #ededed;
}
If you couldn't get the line numbers work with word-wrap:break-word
, simply use Alex Gorbatchev's syntax highlighter like everyone else ;) No need to reinvent the wheel.