Questions tagged [word-wrap]
In text display, line wrap is the feature of continuing on a new line when a line is full, such that each line fits in the viewable window, allowing text to be read from top to bottom without any horizontal scrolling.
2,696
questions
0
votes
0
answers
32
views
How to move line of selector spans based on active one?
I'm working on a Bootstrap image carousel that displays the content based on the year chosen.
What I want to achieve:
The list is supposed to overflow, but I need to move it based on the currently ...
-2
votes
0
answers
16
views
Soft avoid line break in inline element
Is there a way in HTML+CSS to avoid, but not strongly prevent, line breaks in an inline element. In particular
If the element can fit in a line without breaking it should not break.
If the element is ...
0
votes
1
answer
30
views
Google drive image not displayed in html code of sites.google.com
I am writing an HTML code for the sites.google.com.
I have found the code to wrap the text around the image but I am unable to display the image itself. The image is in google drive(share status is '...
0
votes
0
answers
27
views
Overflow: auto is reducing entire site instead of only one div
I've added "overflow: auto" to one of my divs in my test webpage (chat app). The problem is if I'll add more messages to display, overflow: auto is not behaving properly. Instead of wrapping ...
-1
votes
1
answer
40
views
How to turn on word wrap in PowerShell ISE editor? [closed]
It seems that there is no option for word wrapping in this editor - or my vision is somehow completely impaired and my google searches totally misspelled
I am using Windows 10 Enterprise 20H2 19042....
0
votes
0
answers
43
views
UITextView first character in 2nd and 3rd lines
I'm trying to add a character to the first character of second and nth line of a UITextView
I see alot of solutions using range of first return char, but I'm looking for a wrapped line
edit: …is there ...
0
votes
1
answer
34
views
How can I prevent "yyyy-mm-dd" from breaking within the string
I have block of strings (below) that looks like this:
022-05-26 2022-05-25 2022-05-24 2022-05-23 2022-05-19 2022-05-18 2022-05-14 2022-05-11 2022-05-10 2022-05-09 2022-05-08 2022-05-05 2022-05-04 2022-...
0
votes
0
answers
17
views
How add a line break to a long string after 70 characters when encountering a " " [duplicate]
I'm trying to create a method which returns a string with line breaks without breaking any words. But I haven't found any solution at the moment.
string_list = "Tom told us about his new job, and ...
0
votes
0
answers
13
views
Image wrap with long text causing an issue with FF and Safari (works fine on chrome browser)
this is chrome
this is firefox
Can anyone please suggest CSS and HTML structure for this? Text should wrap around image with having long text (important for German language).
-1
votes
1
answer
23
views
How can I have a span tightly wrap text when it is forced to newline by max-width?
Is it possible to have some text wrap at a max-width, and then have the resulting text element be as small width-wise as possible?
Currently, when my text gets longer than the max-width, it wraps and ...
-2
votes
1
answer
14
views
Menu Item does not break like but pushes one word over the other when re-sizing window
It's probably something small, but I cannot figure it out. When resizing the browser window, the string in the list items don't break onto a new line. (see image) I tried to add overflow-wrap:normal. ...
0
votes
0
answers
22
views
How can I get the "displayed" position by VSCode API when word-wrapping is enabled
I want to get "displayed" position when word-wrapping is enabled.
A example: for this position
Its "actual" position is {line: 1, character: 49} (start from {line:0, character: 0})...
0
votes
1
answer
27
views
Python Reportlab - Wordwrap on Table is splitting words rather than at spaces
I created a PDF in reportlab using a canvas:
self.pdf = canvas.Canvas(f'{file_name}.pdf', pagesize=A4)
I create tables within tables to create my document but one of my tables is not wrapping the way ...
0
votes
1
answer
22
views
solr PDF and word wrap
I am using Solr to index PDF documents.
Everything works well, but there is one problem. If a word in a PDF document has been wrapped to another line, then it is indexed as part of the word plus a ...
0
votes
1
answer
43
views
Wrapping an object in Python
I am currently trying to write a python wrapper for a project that use non native python calls, to be able to run it in native python.
The code is normally ran into a software that expose additionals ...
0
votes
1
answer
99
views
Why my text don't wrap when I'm trying to decrease my size of div in react
I don't understand but when I am trying to do it in simple html. The text is not overlapping in div but in reactjs it is overlapping. Here is my problem.
const comments = [
{uid:'...
0
votes
0
answers
31
views
Woocommerce / Divi Checkout Validation Error wrapping red
i would love to have a red wrap and a red label of missing required informations in my checkout of woocommerce after the validation function worked.
for now i am using this code. i tried a lot of ...
1
vote
1
answer
25
views
Attempting to get sequential div containers to not overlap previous no wrap text box without specifying fixed width
I know there have been a quite a few like this on here and other sites already, but am kicking myself over this and really should have solved this issue by now - so here it is:
https://jsfiddle.net/...
0
votes
0
answers
34
views
highlight the .replace() word in javascript
function handleTextNode(textNode) {
if(textNode.nodeName !== '#text'
|| textNode.parentNode.nodeName === 'SCRIPT'
|| textNode.parentNode.nodeName === 'STYLE'
) {
//Don'...
0
votes
2
answers
47
views
CSS How to wrap text before last whitespace
I have some div with fixed width containing text in the form 1234 days ago (10/10/1900).
The text must wrap the date part (10/10/1900) ONLY if string is too long to stay on the same line
I tried to ...
0
votes
1
answer
43
views
Prioritize optional line breaks in HTML/CSS
HTML5 has some great tools for controlling optional line breaks: line break opportunity <wbr>, non-breaking space , soft break ­, and zero-width space ​. As far as I ...
-1
votes
1
answer
67
views
Image Text Wrapping in Markdown with Gatsby Transform Remark
I'm trying to figure out a solution to wrap text around images within a markdown document using Gatsby. I have tried the wrapperStyle option but not entirely sure how to get it to work. I've seen on ...
-1
votes
1
answer
43
views
make textarea not wrap when using specific symbols [duplicate]
I have a textarea I am using for an ASCII art 3d game and when there are different types of characters, it wraps even though I have set all the css wrapping stuff to no wrap. It's only meant to wrap ...
1
vote
1
answer
70
views
Flex wrapping causes border to have padding
I want to display 2 separate strings in-line when the screen is big enough. But when the width gets smaller, I want the 2nd string to move down. I'm currently using flex wrap, but it's adding extra ...
2
votes
1
answer
510
views
How do I text wrap with flutter text widget?
I have a RenderFlex overflowed by 72 pixels on the right issue
Caused by the first Text() widget, when users have really long texts. I even tried to use Textoverflow, but that didn't do anything ...
2
votes
1
answer
173
views
How can I wrap two rows at once / together?
I have multiple pairs of rows of text.
I want that each pair of rows wrap together, and each character always stays above or below its counterpart, without sliding right or left.
Example: a songbook (...
1
vote
2
answers
81
views
How do I maintain a consistent (but unknown) width when performing word wrap using pure HTML + CSS?
This was a very hard question to Google since there are lot of similar problems with similar wordings. To be specific, what I'm after is purely for aesthetic purposes:
A long string can wrap like
this....
0
votes
0
answers
49
views
Word wrap and full justify text so that each line has the same length
I am trying to create a class HW2 using the prettyPrint method. I am trying to do a word wrap and full justify text so that each line has the same length (using System.out.println). I am trying to get ...
0
votes
1
answer
25
views
Add margin or fix the element beloif h3 or any other tag is naturally breaking-line
Hi everyone hope you are doing great,
I'm sending this message because i'm fixing an issue..
I have a <h3> tag who is breaking line but not everytime only when he is too long (logic :p) and ...
1
vote
1
answer
40
views
Wrapping Plot Caption
I'm trying to wrap the caption for my (very simple) plot. This is my code for the caption so far:
t = "Figure 1: This caption is too long to be displayed over one line, in fact it will have to be ...
0
votes
0
answers
152
views
Show Tooltip just when text is trimmed because of overflow
I am displaying Tooltip on top of a Text, letting user see the full name of person, but it shows Tooltip, either when text has overflown or not:
child: Tooltip(
message: ...
1
vote
1
answer
176
views
How do we insert \n every n-character or/and after n-th space in a string in R?
On SO I found a solution which helps to insert a value/character every n-th character in a string:
(?=(?:.{n})+$)
But it will be more reasonable to insert a value (for example, tabulation sign or \n) ...
0
votes
0
answers
82
views
wrapping y axis label in ggplot
I would like to wrap my y label text (Percentage of last observed tag detections), so that it will be 2 lines of text instead of just 1 long line. I came across things like label_wrap, but did not ...
0
votes
0
answers
77
views
Wrap within table-cell with long word like email
Hi I am trying to wrap the long word like email within the cell but am unable to do the same, I have tried multiple options like wrap-option="wrap", hyphenate="true" but no luck. ...
1
vote
2
answers
84
views
Highlight wrapped first line in textarea using CSS
I have an textarea element that contains a list of strings. I've written some CSS to highlight the first string (line).
However, this doesn't work well when a long word appears that wraps to a new ...
0
votes
1
answer
30
views
how to indent the following prints
lets say I have someone else's function which does the following:
def print_numbers(N):
for i in range(N):
print(i,'- something something')
now without changing the function I would like ...
0
votes
0
answers
57
views
Why does `word-wrap / overflow-wrap: break-word` break right at this point?
Both for word-wrap: break-word; and overflow-wrap: break-word; CSS properties i have a premature breaking problem at the very end like in this case. Besides, with longer strings I even witnessed this ...
0
votes
1
answer
75
views
CSS - How to add padding to wrapped text?
How can I add padding to the left-hand side of the wrapped portion of text using CSS?
Here is an example of what it might look like if I knew where the line breaks would be:
.wrapper {
border: ...
0
votes
1
answer
46
views
How can I handle spaces and indentations on a text file (file handling)?
Problem
I'd like to delete the first space but keep the format of a play script like document.
I'm trying to delete the space "XXXXXXXXXX" part and left-align keeping with the indentation ...
1
vote
0
answers
33
views
Wrap image in word document using OpenXml SDK
Is there a way to add a new text wrapping type to an image (for example set the wrap option of the image as "Tight") in a word document using OpenXml SDK where the wrap option of the image ...
3
votes
2
answers
209
views
QLabel setMinimumHeight After Custom WordWrap Qt.TextWrapAnywhere PyQt5 ( Full responsive With/Without Emoji )
I want Qt.TextWrapAnywhere for my QLabel in a Layout.
I followed This instruction.My code is also same to give a minimal code
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QPainter
from PyQt5....
1
vote
0
answers
51
views
How to shrink width of all but one table cell (<td>)?
I have researched this and the solutions I have found, like this one use
table {
table-layout: auto;
}
However, I need
table {
table-layout:fixed;
width:100%;
}
because it is the only thing ...
0
votes
1
answer
60
views
Styling word wrap
When a line of text is wrapped in a block element I would like to display a visual indicator that the text is wrapped as opposed to containing an explicit line break character. However, mdn does not ...
0
votes
1
answer
39
views
How to get text in a CSS grid nested in a flexbox to wrap first?
TL;DR: Here's a CodePen.
I have a UI with an image and a grid of text with long lines which looks like this:
I'm using CSS Flexbox with two elements: the image and the text. And then to lay out the ...
1
vote
3
answers
148
views
Using Wrap widget with text
I'm trying to replicate this design.
SizedBox(
width: 330.w,
child: Wrap(
children: [
Transform.scale(
scale: 1.3,
child: Checkbox(
value: false,
...
0
votes
2
answers
76
views
Unable to wrap text in CSS to prevent text from overlapping
I need to wrap the text in my CSS file so that when it is viewed on a phone the text doesn't overlap (see screenshot below). I thought it would be as simple as adding overflow-wrap: break-word; and ...
0
votes
0
answers
24
views
How to select the first element after wrapping to a new line? [duplicate]
Is there a way to select the first element after wrapping to a new line?
In this example, I'm trying to make it so that middots · appear on all list items that don't begin a line.
I can keep the ...
2
votes
1
answer
159
views
Using regex to insert hard line breaks to wrap text to a maximum line length, on spaces when possible
I'm having a bit of trouble figuring out the correct way to code my regex expression. Basically I want to insert hard line breaks (<br>) into a string. Let's say I want the maximum line length ...
0
votes
1
answer
83
views
Replacing a space with a new line in a long string in order to "wrap a text"
I need to use a long string as a label in seaborn graph. If I use the long string the effective plot area is reduced so I want to wrap the lines, see below:
What I want to do is take a long string e....
0
votes
0
answers
19
views
Is there a generally known good algorithm for text input in a text editor?
I'm working on a text editor, and I'm curious if there is a known good algorithm for inputting text from a user and handling line wrapping as they type? It would need to deal with edge cases such as ...