(no subject)
Dec. 7th, 2010 09:00 amDear Lazyweb,
I would like to display some text in a web-browser that ends up looking like this:
| Someone says " | The quick brown fox jumps over the lazy dog. Victor jagt zwölf Boxkämpfer quer über den Sylter Deich. Cwm fjord bank glyphs vext quiz. Buvez de ce whisky que le patron juge fameux." |
| Someone else says " | The quick brown fox jumps over the lazy dog. Victor jagt zwölf Boxkämpfer quer über den Sylter Deich. Cwm fjord bank glyphs vext quiz. Buvez de ce whisky que le patron juge fameux." |
i.e. the indent on the second line is as far as it had got up to with the quote mark on the first line. I can do this in tables (see the source). I'd like not to. Is there a way of doing this with <div> and CSS? From my researches I can see no way, but I'm not an expert.
no subject
Date: 2010-12-07 09:49 am (UTC)no subject
Date: 2010-12-07 10:26 am (UTC)If you are concerned about precision on a browser that has a font enlarge or reduce set, the javascript at the bottom takes care of that. It's not pretty, but it works.
I think there might potentially be another way by leveraging the box model, I'd have to experiment a bit more.
no subject
Date: 2010-12-07 11:04 am (UTC)no subject
Date: 2010-12-07 11:17 am (UTC)You can do it if you are prepared to have a fixed height for the segment, but like I said, that sucks.
no subject
Date: 2010-12-07 10:42 am (UTC)Does the hanging indent always have to reach a specific character (i.e., the quote mark)? If not, then you can easily do this using a negative value for the text-indent property. Google "hanging indent css" for examples.
If the indent does have to reach a specific character, that sounds complicated. A good place to ask is comp.infosystems.www.authoring.stylesheets (news:comp.infosystems.www.authoring.stylesheets).
no subject
Date: 2010-12-07 10:50 am (UTC)no subject
Date: 2010-12-07 10:46 am (UTC)no subject
Date: 2010-12-07 12:00 pm (UTC)no subject
Date: 2010-12-07 12:38 pm (UTC)no subject
Date: 2010-12-07 12:47 pm (UTC)Current version is closer, but I want the indent amount to be based on the width of the introducing text: ie the quotes shouldn't line up. I shall amend my example to demonstrate this.
no subject
Date: 2010-12-07 12:53 pm (UTC)no subject
Date: 2010-12-07 01:00 pm (UTC)no subject
Date: 2010-12-07 01:11 pm (UTC)no subject
Date: 2010-12-07 01:31 pm (UTC)no subject
Date: 2010-12-07 01:35 pm (UTC)