Setting the Width of the Code Box (PrismJS): A Guide to Practical Tips
P粉392861047
P粉392861047 2023-09-01 13:37:19
0
1
564
<p>So I'm basically trying to set a width for a code box (I'm using prismJS) and when I add too much code it causes everything to break and the width and height to increase. I want to be able to specify the width and height so if the code is too long it just adds a scrollbar. </p> <p>This is the size I want the code box to be: Image</p> <pre class="brush:php;toolbar:false;"><div class="container"> <div class="post-header">SOME HEADER</div> <div class="post-content"> <p> <pre><code class="language-js"> </code></pre> <p> <img class="image-content"> <div class="post-content"> </div> </div></pre></p>
P粉392861047
P粉392861047

reply all(1)
P粉807239416

You need to add a CSS property to your code box

overflow: scroll;
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!