how to apply ellipse effect in which contain space in string?

Tags: html,css

Problem :

i want to show ellipsis after some width.i want to do this with css. & only in one span tag.(no other tag should used label..etc). how can i achieve this.

<span>Name: Patrick Jonson</span>

output should be below one

Name: Patrick jon...

problem is that it break word when space appear.

Please help.

Solution :

If I understand correctly...this is straightforward enough to accomplish-

Demo Fiddle


<span class='ellipsis'>Name: Patrick Jonson</span>



    CSS Howto..

    How can I change the shape of a gridview to circular?

    How to set the container height automatically maintaining the ratio

    How can I change the CSS values of multiple elements when my sticky menu becomes fixed?

    How to get smaller divs to stack to the right of larger divs?

    How to add vendor prefixed gradients to an element with vanilla JavaScript? [duplicate]

    How do I use the CSS box-model to make sure my body is spaced from the edge of the window despite being 100% high?

    How to get text within div to be relative to the div's width and height, CSS, HTML

    Javascript: Hover over Issues & How can I structure the html efficiently?

    How can I make these CSS absolute positions work in IE?

    How to style an menu with CSS

    how to add embedded ruby in style tag

    How to force a TD to be a certain height with CSS?

    Showing refresh button when animation is complete?

    How to avoid text selection in web page using css?

    How to add a color in the
    bottom content area?

    How to align icons in a form using flexbox / css in a responsive way

    How to design a CSS for floating confirm dialog centered on the visible portion of a page?

    How would I generate a css, js and html file using php?

    How to bring all elements down with a header slide up/down?

    How can I keep my CSS transform (rotate & skew origin) from moving a few pixels to the right?

    How to use css property under a class only

    All nested menus show when hovering over menu instead of just the first

    How to select ids which contain special characters?

    How to modify programmatically with javascript the css ::before and ::after [duplicate]

    Why is my text not showing in my DIV?

    How to adjust progress bar with Jquery?

    how to create a fullscreen website design?

    How to change the scrolling text in CSS or JQuery

    How to make child div scrollable when it exceeds parent height?

    How to apply a property only to the submit button