Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

Flexbox with wrapped text leaves undesired empty horizontal space [duplicate]

I'm trying to create a printable dynamic HTML form but I cannot arrange the questions and answers on the page the way I want. I have a flex container for a pair of question and answer and I expect the ...
SepSol's user avatar
  • 113
0 votes
0 answers
72 views

CSS Wrapping Issue: Prevent Words from Expanding to Fill Row on Wrap

I'm struggling with a Flexbox layout issue where I want a specific wrapping behavior for words inside a <span> classed as keep-together. The requirement is for the words to stay together on the ...
Sotiris's user avatar
  • 87
0 votes
0 answers
49 views

How to wrap text completely around a png object using CSS without canvas [duplicate]

I need to wrap text around an object (from a png image) using CSS. The text should be wrapped just like how it is arranged in the attached image, not in a box or a defined shape. I have achieved the ...
kyser's user avatar
  • 1
0 votes
0 answers
33 views

How to word wrap text with Weebly HTML embed code element?

I'm trying to use the embed code element on the weebly website builder to create a button that hides a paragraph of text where when it is pushed it reveals the text and then the button can be pressed ...
S.B.'s user avatar
  • 1
1 vote
2 answers
80 views

How to format HTML text so it wraps around keywords

So I have this code with a paragraph with keywords and text. I need to make the format so that the keywords appear next to other, the text starts where the keywords end and then the text also wraps ...
Chris Costa's user avatar
0 votes
2 answers
40 views

2 flex containers showing side by side

Inside the .maroon section I have two .whitewrap sections. I was wondering why it doesn't wrap onto another line and displaying them side by side instead. The form should be underneath the text and ...
Jing Liang's user avatar
0 votes
1 answer
41 views

How can I make text wrap around to the same line in a div?

I'm wondering if there's a way in CSS to get text to wrap around a div on the same line. For example, say I have this text inside a div: ...and I position the text more to the right (say it has an ...
gib65's user avatar
  • 1,997
1 vote
1 answer
59 views

Automatic word spacing to fit line CSS

How can i make the word spacing automatically expand in order to fit the containers width? Image example <p class="autoWrap">Lorem ipsum dolor sit amet consectetur adipisicing elit. ...
Nitaki's user avatar
  • 53
0 votes
1 answer
54 views

Why is the wrap=hard attribute not functioning as expected in a textarea element?

I do need the line breaks, but even with wrap="hard", defining cols, the value is still a single line. <!DOCTYPE html> <html> <body> <h1>The textarea wrap ...
hamilton.lima's user avatar
0 votes
0 answers
96 views

css "word break" is not working when I use Korean

I want to line break the tag with word. I used various css but it isn't working. I used "word-break: break-word" , "word-wrap:break-word", and "overflow-wrap: break-word&...
ghshin's user avatar
  • 47
0 votes
0 answers
31 views

Wrapping text inside div1 around div2 that is positioned right in the middle of its parent using CSS only

This is what I have in mind: and I would like to know the simplest way to achieve this purely in CSS adding as little rigidity as possible. I know it's easy to use float to push the red div left or ...
Захар Joe's user avatar
1 vote
1 answer
59 views

How to style a wrapping anchor element?

I have an anchor element that is styled. This works fine until the anchor wraps onto the next line. Then it only applies that style to the vertical intersection of both lines. How can I apply the ...
jNiuk's user avatar
  • 153
0 votes
1 answer
62 views

HTML table fill horizontally but have a single column wrap

I have a web extension popup for Chrome where popup.html contains a table like the following <!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" ...
rovyko's user avatar
  • 4,558
0 votes
3 answers
266 views

Why doesn't the "hyphens" attribute put a "-" at a line break?

I have the following problem: I have a simple div container with the text "International" inside. I want the word to break when overflowing the container width. How do I make it, so that ...
Pascal Wagner's user avatar
1 vote
2 answers
67 views

Why does contentedible div with truncation add whitespace in Chrome when constrained

So I have a setup like this: <div style="width:130px; background-color:lime"> <div contentEditable style="overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"> Hi ...
CreativeAbyss's user avatar
2 votes
1 answer
72 views

Wordwrap on small screens not working for one sentence in my code

I'm studying C programming in my spare time but to practice with a classmate I wrote a little program. I know a bit of HTML and CSS, knew nothing of javascript but that's why we invented search ...
Skyeye's user avatar
  • 23
0 votes
1 answer
31 views

word wrap in HTML for RShiny while keeping MathJax

Suppose we have longtext.Rmd file that returns html to be displayed in RShiny using withMathJax(includeHTML("www/longtext.html")) --- output: html_fragment --- # **1. Heading** long text ...
aiorr's user avatar
  • 579
0 votes
0 answers
235 views

python sphinx settings to toggle line wrap in code-block

Is it possible to add a button (similar to the copybutton of sphinx_copybutton) to toggle line wrap in code blocks? This toggle feature can be seen in many places such as lazyvim plugin-in doc(narrow ...
DeeliN uno's user avatar
-1 votes
1 answer
86 views

Making HTML li elements wrap like sentences in a paragraph

I would like to have text list elements wrap like sentences in a paragraph. Here is the HTML & CSS, as well as a code snippet that illustrates how if a li element is longer than the width of the ...
interwebjill's user avatar
0 votes
2 answers
28 views

HTML Text Wrapping

I am working on an image/text box for my website, and I want the image to stay to the left of the text, which I got working with only 1 or 2 lines of text beside it: It stays beside the image However ...
towerbolt's user avatar
1 vote
2 answers
73 views

Is it possible to have the final line of wrapped text behave like an inline-block element?

I have a headline followed by an icon, arranged on the same line like so: <div class="outer-container"> <h1 class="article-header">Sample Short Headline</h1> &...
Sam Sabin's user avatar
  • 1,147
0 votes
1 answer
222 views

Wrap long string in Django template with no effect to rendered text (spaces, indentation, etc.)

I have a line of code in a Django template that accomplishes exactly what I want (display information in a tooltip), but it is far too long. Here's the line: <abbr title="Comment: {{ material....
coelhoigor's user avatar
0 votes
0 answers
53 views

Is there a way to set wrapping to make the same amount of objects on each line in CSS

I have multiple items and I use flex-wrap to make design responsive. #myList { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; } While for the most part everything is fine,...
Maks111's user avatar
0 votes
1 answer
21 views

How to prevent scrollable elements without word wrap from making the page too wide?

I'm trying to create a documentation page that does not grow beyond the size of the screen. The example below works, but once I add a <pre><code> block with lots of text, this text is not ...
Jespertheend's user avatar
  • 2,200
2 votes
1 answer
679 views

htmltagwrap command not found in vscode

While writing html code, I pressed the shortcut alt+w to use the htmlTagWrap extension. However, the wrap function does not work with the warning message "command 'extension.htmlTagWrap' not ...
jackerbell's user avatar
4 votes
0 answers
54 views

How to insert separator between items except when wrapped (in CSS)? [duplicate]

Okay, you’re got a box. You are rendering two (or more items) in the box. Let's assume they are inline (or inline-block) elements. When more than one item appears on the same line, we want to insert ...
Alan H.'s user avatar
  • 16.6k
0 votes
2 answers
30 views

Is there a way to wrap text to a new div/p/other element automatically without manually needing to manually or with .Js/js framework?

what i'm looking to do, is something akin to text-box wrapping in photoshop/illustrator/other, where you can write one paragraph, but if you "spill over" it will jump to another text box as ...
iminsert's user avatar
2 votes
1 answer
338 views

In CSS, how can I prevent a gap to the right when multi-line text is constrained inside a wrapper? [duplicate]

EDIT: It turns out this is currently impossible with just CSS. A good explanation can be found here: CSS Width / Max-Width on Line Wrap? Below, I have an outer class which specifies a fixed width, ...
Bret Cameron's user avatar
1 vote
0 answers
45 views

How to turn off text wrapping?

I have question how to turn off text wrapping? I want to text on the left side will be the same as the text at the right side. I mean that text on the left side won't wrap. Please help me. Here is my ...
Rafal Lafar's user avatar
1 vote
1 answer
44 views

CSS - How to fix body flexibility problem in a form?

I've created a login form using html and css. Everything was okay but then there is a problem arises when I tried to resize the width and height of the window screen by cursor. Contents inside the ...
Mohd Kashif's user avatar
0 votes
1 answer
644 views

Word Wrapping in a button using Bootstrap 5

I am trying to create a button using Bootstrap 5 which looks like this: I went through this similar post, but couldn't find a solution. This is the HTML code which I tried to write: <button ...
V.G's user avatar
  • 103
0 votes
2 answers
55 views

Text overflows parent div and break-word doesn't work

I have a notification box that i am trying to fit into the view with @media property, but I can't seem to wrap the text inside the box. It overlaps when i set the screen to phone size for example. ...
user avatar
0 votes
1 answer
203 views

Avoiding border radius with text in span

I have an editable span with rounded corners as shown in the picture below. As you can see, the text runs off the corner and I would love a way to keep the text inside the box. is there a good way to ...
klaytonme's user avatar
0 votes
1 answer
487 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 '...
Ryan's user avatar
  • 35
-2 votes
1 answer
29 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. ...
Boonz's user avatar
  • 1
0 votes
1 answer
2k 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:'...
MYTH's user avatar
  • 115
2 votes
1 answer
1k 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 &nbsp;, soft break &shy;, and zero-width space &#8203;. As far as I ...
Merchako's user avatar
  • 879
-1 votes
1 answer
71 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 ...
GiantBooley's user avatar
1 vote
1 answer
188 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 ...
Vikktour's user avatar
2 votes
1 answer
396 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 (...
DavidBevi's user avatar
2 votes
2 answers
391 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....
Thomas's user avatar
  • 721
0 votes
1 answer
112 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 ...
Sayf-Eddine's user avatar
1 vote
2 answers
453 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 ...
Ad Hominem's user avatar
0 votes
2 answers
763 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 ...
luke's user avatar
  • 1
1 vote
1 answer
409 views

Flex wrap in HTML on multiple span elements

For a website I have to display a div with multiple spans inside. Each one contains one character (with a specific colour class). When I use wraps of any kind, they don't recognize the text as whole ...
Dakopen's user avatar
  • 82
-1 votes
3 answers
5k views

Trouble Wrapping Text HTML CSS

I'm super new to HTML and CSS and I'm trying to make a small website for an assignment. I haven't gotten very far and I'm having trouble with text wrapping. The first line of the text looks great, and ...
Ryloguy's user avatar
2 votes
0 answers
167 views

CSS white-space: normal fails with sibling span element in Firefox

I have encountered an issue when trying to restrict line wrapping to particular locations on lines. I know that there are other ways to do this, but the way that was simplest for me (with my generated ...
Sudo Bash's user avatar
  • 403
0 votes
1 answer
109 views

Why do the content inside my html code element tag not wrap itself?

I have this HTML code tag that contains code. Some of the code is quite long and I want it to wrap around to the next line instead of going outside the element block. However it is not working for me. ...
niyojet344's user avatar
3 votes
2 answers
2k views

CSS text-overflow: ellipsis wrapping on nested div structure

I have the following 3-level tree of nested divs. The outer one has a max width and I want the ellipsis wrapping on that node, not on the individual child nodes. I already almost got there, problem is ...
striderhobbit's user avatar
0 votes
1 answer
507 views

Put H4 and 1st line of P on the same horizontal line, but the 2nd line of P should be vertically aligned with the 1st line of P?

I'm trying to create a CSS style sheet for a stage play wherein the Character (H4) appears on the same horizontal line as the 1st line of the Dialogue (paragraph). At the same time, I want it so that ...
playwritingwithcss's user avatar

1
2 3 4 5
13