Caroline Clifford wrote:

> I have to code this part of the following page (this is from
> the designer)
>
> http://www.localgirl.co.uk/dump/css_example_correct.gif
>
> Unfortunately it's driving me a bit mad as I can only get it
> like this:
>
> http://www.localgirl.co.uk/dump/css_example_incorrect.gif

I don't think you can get what you want without altering the markup.
Especially if you want a ragged right side with right padding within each
line.
According to the spec [1]
"When an inline box is split, margins, borders, and padding have no visual
effect where the split occurs (or at any split, when there are several)".
So what you are seeing (padding only at the beginning and at the end of the
series of lines) is correct behaviour.
You can probably fake the left padding, for example with a border on a block
container, but not the 'ragged' right one.
Moreover this background applied to an inline-level element has another
problem: it's difficult to make sure that there are no gaps between the
lines (assuming that you don't want them.)

Bruno.


[1] http://www.w3.org/TR/CSS21/visuren.html#inline-formatting


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

Reply via email to