I’d like to create the following in css:
I’ve a long text which should be displayed on a single line, and a hyperlink next to this text (this will later be placed in the header of the website, that’s why it needs to be a single line).
When the there is little room on the screen, I want the string to be cut off (“testtest..” – hyperlink). When the window is resized and there is more room, I want the text to be shown (as much as possible (e.g. “testtesttesttesttesttesttest.. – hyperlink”).
The problem that I’m having is that the string doesn’t want to be cut off. It always remains in its full size.
Here is a link to the JSFiddle: http://jsfiddle.net/PNGDw/1/
note: here I’m trying it with a table, I’ve also tried it with floats, but that didn’t work either.
Thanks for the help
You have a 5em width on the table so it will not resize. Use something like: