I have a pre
tag with some code in it that doesn't line wrap. I want to put a border around it (border:1px solid Black;
), but the border is limited to the width of the browser, regardless of the length of the text. How can I force the border to always extend to contain all the text in the pre
tag?
Here's the code I'm using:
<pre style="border:2px solid Black;">@Model.Code()</pre>
Use:
<pre style="display: inline-block; border:2px solid Black;">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With