Questions tagged [text-indent]

css property that specifies how much horizontal space should be left before the beginning of the first line of the text content of an element

1 vote
1 answer
26 views

One space is added in the beginning of input string

I am trying to print a line by taking the user input. But there is an empty space before the user input is printed: Code: UserInput = input('Enter a string: ') print("\nEntered string is:\n",...
user avatar
  • 23
3 votes
1 answer
145 views

Indent first line of a paragraph, but only if it takes multiple lines

I'd like to indent the first line of paragraphs (exactly what the text-indent CSS property does), but only for those paragraphs that take multiple lines. If a paragraph fits in a single line, I don't ...
user avatar
0 votes
1 answer
216 views

Why does first line of <pre><code> text display with some indent when formatting is changed with CSS?

I'm trying to change the appearance of code sections on my Joomla 4 website using the Cassiopeia template. A sample HTML source looks like this: <p>Trying to format a code section below.</p&...
user avatar
  • 2,251
0 votes
2 answers
66 views

Get text indent of HTML select elements

At HTML Select elements there is around 4px indent. How can I calculate/ get the exact value using JavaScript I tried this but doesn't get me the correct value const el = document.querySelector('...
user avatar
  • 2,401
0 votes
0 answers
22 views

Indent Overflow Text Wrapping with CSS/Javascript

I have a a list of text strings, each entry marked up as the contents of a discrete span and all the spans contained in a flexbox div that stacks them vertically. This creates a nice list. For reasons ...
user avatar
-1 votes
1 answer
49 views

why does link inside indented p also indent

The paragraph below is indented with css: p + p {text-indent: 1.5em; margin-top: 0}. The a:hover tags inside this paragraph also indent showing extra space on the left side of the link, but I don't ...
user avatar
  • 11
0 votes
1 answer
112 views

How to change the background color of an indented list item on hover using CSS?

I have an HTML list and each list item of LTR text has a hanging indent. When the user hovers over a list item, I want the background of the entire string of the list item to be hovered. But because ...
user avatar
1 vote
1 answer
296 views

How do I get a hanging indent on a DD tag in CSS while also using content:before

We have this page with a bunch of definition lists. The guy making style mockups in Word came up with this brilliant idea to render the definition lists as "term - value" and hanging indents....
user avatar
  • 39k
0 votes
0 answers
589 views

How do I automatically dedent code in vscode?

I have a code similar to below open in vscode def func(): # Do something with about 24 lines But then I feel like it would be better to remove my code from a function definition because of some ...
user avatar
0 votes
1 answer
40 views

"text-indent" stopt working after adding an href

I'm really new to CSS and I'm trying to hide some text with with the "text-indent" method but after adding an <a> -tag it just wouldn't work anymore. I now got my img and the the text ...
user avatar
-1 votes
2 answers
777 views

How to auto indent next line of string [closed]

I am trying to make a program using Python that will auto indent the next line of string when it encounters certain characters such as braces. For example: public class Example{ --indent--> ...
user avatar
  • 13
0 votes
2 answers
1k views

how to add em space (&emsp;) after BR tag using CSS

I want to add an em-space just after BR tag so as to achieve text-indent effect. But the following STYLE doesn't work on my Chrome. Or, any other way to achieve text-indent effect after BR tag? <...
user avatar
2 votes
1 answer
3k views

The latex package "indentfirst" not working in R-markdown

I am trying to indent the first line after a section header using the indentfirst package but it is not working. --- title: "Evaluation of Coaching Teachers by Program" header-includes: - \...
user avatar
  • 101
0 votes
1 answer
383 views

How to save file content without modifying the space or indents [duplicate]

I am using the below code to read and update the text file. using (StreamReader r = new StreamReader(filepath)) { var json = r.ReadToEnd(); AppSettings rootObject = JsonConvert....
user avatar
  • 2,749
2 votes
1 answer
1k views

JSON Object to String with carriage-return

In my flow, I read and run (for-each) an array of JSON objects. I insert each object in the same file with APPEND type. I want to store each JSON with indent as false (one line by JSON) and a ...
user avatar
  • 1,049

15 30 50 per page
1
2 3 4 5
8