Thanks, Alan,

The thing is that I don't want only the first <br> to be widened. I want all 
<br>s that are not immediately preceded by another <br> to be widened.

I just want to special-case <br><br> or <br><br><br>. I don't want to special 
case the following:

Some text <br>
Some text <br>
Some text <br>
Some text

Rick Gordon

------------------

On 4/17/10 at 9:17 AM +1000, Alan Gresley wrote in a message entitled
"Re: [css-d] Combinators: How to Address Multiple Successive":

>How about this.
>
>.post-body br:first-child {
>display:inline-block;
>margin-bottom: .75em;
>}
>
>This will only target the first <br> in the element .post-body.


>Rick Gordon wrote:
>
>> I maintain a Blogger site for a non technical user. Since (unless you 
>> explicitly tag it otherwise) a pblog post consits of a single paragraph, and 
>> uses <br/> tags (mapped to the user's carraige returns).
>>
>> I would like to set up a means of increasing space under these breaks, but 
>> not multiplying the increase if 2 or more breaks are inserted in succession.
>>
>> So I made a br style:
>>
>> .post-body br {
>> display:inline-block;
>> margin-bottom: .75em;
>> }
>>
>> This handles single breaks fine, but the space gets too big if multiple 
>> breaks are used.
>>
>> So I tried both of the following:
>>
>> .post-body br - br {
>> display:inline;
>> margin-bottom: 0;
>> }
>
>
>There is no such combinator as '-'.
>
>
>> .post-body br + br {
>> display:inline;
>> margin-bottom: 0;
>> }
>>
> > ... but what happens in either case is that breaks after the first one are 
> > affected, even if they are not in immediate succession. Any suggestions as 
> > to how I might achieve my aim here? There's no way the user is going to 
> > deal with HTML for this, so CSS is the only hope.
>>

-- 
___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________

WWW:   http://www.shelterpub.com
______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
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