Questions tagged [line-height]

64 questions
0
votes
2 answers

Height and line-height styles not applied

Line-height and height not applied in these spans. Here's the code: https://github.com/giniblanco/recipe-app Thanks. See picture
Gini Blanco
  • 118
  • 1
  • 6
0
votes
1 answer

CSS: textarea line-height match Line number line-height?

I have this textarea which I am using with this hack to get line numbers: It's great however, I can't get the textarea's line-height, padding etc to match up with those same properties of the line-numbers. You can see below after line 6 the lines…
Antonio Pavicevac-Ortiz
  • 7,239
  • 17
  • 68
  • 141
0
votes
1 answer

Xcode: Editor line height inconsistent when inputting multibyte characters

The line height slightly gets larger when I type multibyte characters in Xcode (in the picture it's Japanese) and I find it very annoying. I tried changing the system language to Japanese and also tried Japanese fonts but no luck. This issue doesn't…
Jake A.
  • 540
  • 5
  • 12
0
votes
1 answer

CSS: with overflow: hidden and max-height a multiple of line-height, "hidden" text bleeds into view in Chrome and Edge

Hopefully with Zoom = 100% or if not, with Zoom = 90%, you can run the following Snippet and see at the bottom of the text is a small amount of the top of the letters from the first line that should be hidden. On one of my machines it appears with…
Reid
  • 3,170
  • 2
  • 23
  • 37
0
votes
2 answers

Set image to same line with text that doesn't have default line height

If my text doesn't have default line-height value and I have images that are floated either left or right it looks like the image doesn't start from the same line as the text. Is there anything I can do about it? I know I could add some top-margin…
Shnigi
  • 972
  • 9
  • 19
0
votes
1 answer

Line height on inline-block div pushing down other inline-block siblings

I am experimenting with the line-height property, and read from MDN that: On non-replaced inline elements, it specifies the height that is used to calculate line box height. However, in the case below, I set the line-height on .one but it is…
Robert0000
  • 17
  • 5
0
votes
1 answer

Singe List Item Line Height Differs When Wrapping Multiple lines

so I'm having a weird CSS line height issue with list items that may wrap on to a third item for a single point. The line height has a set value but it appears when it wraps on to a third line within the same point the line height is different. So…
Nick
  • 185
  • 2
  • 14
0
votes
0 answers

Make DIV as wide as the current line-height?

Let's say I have a
element, and I want to make its width equal the current line-height. Is there a CSS unit or some fancy calc() function that will accomplish this? I know a workaround is to simply hard-code the actual line-height into a…
user3163495
  • 2,425
  • 2
  • 26
  • 43
0
votes
1 answer

Line Spacing react-draft-wysiwyg

I want to implement Line Spacing options (single,double, exactly ,line per inch) in react-draft-wysiwyg editor but currently i don't think that it is support Custom line spacing , Open Issue , problem statement is i want to apply different line…
Ali
  • 557
  • 1
  • 9
  • 30
0
votes
0 answers

Web font ignores line-height or is mis-aligned

We are building a new website and want to use some web fonts (hosted on fonts.google.com). We've done this in the past and did not have an issue (using OpenSans back then). We've settled for a different font this time…
David Behler
  • 179
  • 1
  • 2
  • 8
0
votes
1 answer

The css attribute "line-height" has no effect under an iframe wrapper?

I don't know why "line-height" lose efficacy under iframe, did someone meet same issue before? By the way, there are two diffs: 1. I used iframe in a way: document.write not src. Does it matter? 2. There is a svg tag under div
0
votes
1 answer

Vertically aligning image and span inside div

I have an image and a span in a button, and I've tried using: flex with align-items: center setting span line-height to same height as container inline-block and vertical-align but if I don't add a 1px padding-top to the image, it doesn't appear…
M Fukazawa
  • 43
  • 1
  • 6
0
votes
2 answers

empty line in a p. line-height seems not to work

i am trying to add empty space between lines in a html title: I really cant figure out where my problem is... :-( The html is: .col1 { width: 10%; border: 1px solid red; display: inline-block; } .col2 { padding: 20px; width:…
Frederic CS
  • 89
  • 1
  • 6
0
votes
1 answer

Poppins and Line Height

I encountered a strange behavior recently with CSS, and I'm trying to understand what's happening, but I think I miss some knowledge about the renderer engine in navigators. The code is on codepen: https://codepen.io/ghivert/pen/mdyEZpe. For…
ghivert
  • 436
  • 4
  • 15
0
votes
1 answer

What is the standard way to maintain specified margin between two lines if the line height exceeds the margin?

At the workplace they have provided me a wireframe like this. Explanation about the above image: Maintain a margin of 10px between the lines and use the provided css class .font16 . This is the content of the .font16 class : .font16{ font-size:…
node_man
  • 1,359
  • 4
  • 23
  • 50