Breaking long lines of command lines, on mobile.

I've got a page with a long line of code. It's wrapped in <pre><code></code></pre>. It is the widest part of the page if I keep minimizing the rest as it doesn't break. It happens to be a git clone command, so it has a long URL on the end. Is there a generally accepted place to break up the URL, and allow it to wrap? Do I need to specify something to make it typeset in a nice, obvious way to show that it was broken to display but shouldn't be on the command line?
11 Replies
glutonium
glutonium8mo ago
overflow: scroll; try that u need to give a fixed with the parent element. (the same one with overflow: scroll )
rik
rikOP8mo ago
hmm. Thank you. Now I shall figure out how to fixed-width a parent element.
ἔρως
ἔρως8mo ago
why not auto? setting max-width to 100% may be enough, depending on the styles applied to all the parents
rik
rikOP8mo ago
Here's the page: https://night-vision-discord.github.io/website/starting-editing/ I haven't dropped it in to my codepen yet
ἔρως
ἔρως8mo ago
where's the element?
rik
rikOP8mo ago
The code and pre Most of the way to the bottom. Specifically it's the git clone command.
ἔρως
ἔρως8mo ago
add this:
.maincontent {
overflow: hidden;
}

pre {
overflow: auto;
}
.maincontent {
overflow: hidden;
}

pre {
overflow: auto;
}
(you don't need the width on the pre)
rik
rikOP8mo ago
Thank you!
ἔρως
ἔρως8mo ago
this type of thing is always a huge pita
rik
rikOP8mo ago
Its all learning curve for me.
ἔρως
ἔρως8mo ago
it will get easier with practice
Want results from more Discord servers?
Add your server