When the mouse pointer hovers over the line below, the rest of the line is revealed. Use the overflow:visible CSS declaration for the class' :hover selector.Īn example incorporating the above CSS declarations follows. However, there is a way so it can be seen when the mouse pointer hovers over the line of text. If the text didn't need to be seen, it wouldn't have been put there in the first place. Of course, merely clipping text is not a solution in most cases. Now, the class for the container with the one long line of text has these three CSS declarations: ![]() Optionally, use the CSS declaration text-overflow:ellipsis to print an elipsis where some of the text is clipped. Which may make the text so small it is hard or impossible to read.Īnother way to correct it is to use the CSS declaration overflow:hidden to clip any text that extends past the right side of the container.Īt this point, the class for the container with the one long line of text has these two CSS declarations: One way to correct it is to reduce the font size of the text until it fits within the container. ![]() If there is more text than fits on the line, it will extend past the right side of the div or other container. The CSS declaration white-space:nowrap keeps all text on one line. When text must stay on one line, but there is not enough room for it all, here is a solution.
0 Comments
Leave a Reply. |