How to prevent line break ?

How to prevent line break ?

am 18.05.2007 12:42:31 von thogra

Hi all,

I have something like this: "This is a quote"

Now I want the quotation marks to be a little larger:



My problem is now that the last quotation mark sometimes gets a
linebreak making it standing alone on the next line which - of course
- looks ugly.

Can I somehow glue it to the last word in the sentence ?

Thanks

Re: How to prevent line break ?

am 18.05.2007 13:51:41 von Toby A Inkster

thogra wrote:

> Can I somehow glue it to the last word in the sentence ?

Adding a "zero-width non-breaking space" character between the word
and the quote mark should do the trick, but it's not supported in Internet
Explorer.

You could add ... around the last word and quote mark, but
this will stop your HTML for validating, as , despite being widely
supported, was never standardised. If validating your document is
important to you, you could always create a custom DOCTYPE.

The final option is to use something like ...
instead of
... and define a style like:

.nobr { white-space: nowrap; }

--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python/Apache/Linux

Re: How to prevent line break ?

am 18.05.2007 18:43:26 von jkorpela

Scripsit thogra:

> I have something like this: "This is a quote"

But what's the _exact_ thing you have? URL?

> Now I want the quotation marks to be a little larger:

Why? In any decent font, quotation marks have been designed to match the
design of letters, and in indecent fonts, their _shape_ is wrong anyway.
Thus, select a suitable list of _fonts_, if you are worried about quotation
mark appearance. For example, don't use Verdana.

>

Which quotes are you actually using? Surely not English-style quotes. And
not really German-style either. Even Duden's pages use wrong characters, but
the correct closing quotation mark for German is “ and not ”
(note that the _names_ of the characters are misleading and reflect English
usage). This is relevant, since different quotes have different line
breaking behavior.

> My problem is now that the last quotation mark sometimes gets a
> linebreak making it standing alone on the next line which - of course
> - looks ugly.

Please post a URL and specify the browser(s) tested.

> Can I somehow glue it to the last word in the sentence ?

If you are really using ” as a closing quote, you should not have
problems with line breaks. But if you actually use “, as you might
need in several languages, then you can use

„This is a quote“

The allows an immediate line break after “, and this might be
useful, since some browsers don't break there automatically (since they
assume, so to say, that everyone uses “ as an _opening_ quotation
mark). Specifically, if the closing quotation mark is followed by a space
and an opening parenthesis "(" or "[", IE will not divide the text into
lines so that the parenthetic expression starts on a new line.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/