On Tue, 5 Jun 2007, [EMAIL PROTECTED] wrote:

> span.label { margin: 0; padding: 0; width: 40%; border-top: solid 1px 
> #DDDDDD; border-right: solid 1px #AAAAAA; text-align: right; }

The width property does not apply to inline elements, and span elements 
are inline by default. Some browsers get this wrong in Quirks Mode.

> <div class="data-block">
>     <span class="label">label text here</span>
>     <span class="value">answer text here</span>
> </div>

- -

> But with this there is the possibility that the text within span.value 
> can be quite long and can then fall under the span.label text, which is 
> not what I want. How can I prevent this so that long text wraps under 
> itself?

It sounds like you have, logically speaking, an array of question and 
answer pairs. Wouldn't it be natural, then, to use table markup for it? 
The CSS part would be rather obvious, basically just adjusting spacing and 
probably setting td { vertical-align: top; }.

It's cumbersome to simulate a table structure in CSS.

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to