Trouble with nowrap and max-width on an absolutely positioned element
问题 I'm guessing these two attributes don't actually work together, but my situation: I'm trying to create a tooltip component. My tooltip is positioned absolutely, and as I don't know what the length of the content would be, has no width. So with width-related css, text just forms a tall, skinny column. I tried max-width , but on it's own, that does nothing. So I decided to try white-space: nowrap , and while it nicely doesn't wrap text, it also doesn't seem to honor max-width in a useful way,