At 2:28 PM +0100 5/23/11, Bobby Jack wrote:
 > From: Tim Dawson <[email protected]>

 Now I'm trying to get the outline to wrap just the text of
 the para.
 I don't want to set a fixed width (say 'width: 400px;')
 because the
 actual text can vary in width. The best way I've found so
 far is to
 insert a <span> round the text, and put the outline
 on that.
 Is there a better way ?

The <span> option is OK, although you probably won't like how it displays when the text wraps onto two lines. An alternative would be to float the paragraph (and then clear the next element) which will 'auto shrink' its width. But, then, the outline will be full-width if the text covers - at least - one line and one letter. I think you're probably after something like:

-------------------------
| Lorem ipsum dolor sit |
| amet ------------------
|------|

(with apologies to those reading in a non-monospace font)

As far as I'm aware, that's not possible in CSS.

- Bobby


Ahhh, I see better as to what the OP was talking about.

Sorry for my ignorant post.

Cheers,

tedd

--
-------
http://sperling.com/
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to