In your exact use case,I've solved the problem by using the adjacent sibling
selector. More than three items and I consider things a little too messy; I'll
revert to JS or helper classes for more than three items:
> <style>
> .wrap div{width: 32%;margin-right:2%;float:left}
> .wrap div + div + div {margin-right:0;}
> </style>
>
> <div class="wrap">
> <div></div>
> <div></div>
> <div></div>
> </div>
</email>
<signature id="paceaux" name="Frank M. Taylor" twitter="@paceaux" />
On Jun 12, 2013, at 2:46 PM, Tom Livingston wrote:
> On Wed, Jun 12, 2013 at 4:31 PM, Frank Taylor <[email protected]>
> wrote:
>> So far I've only had to really use the :nth-type selectors for tables, and
>> for creating some demos on layouts.
>>
>> When it comes to tables, I'd created an html table-maker that optionally
>> generates helper classes.
>>
>> Outside of tables, I really haven't had projects that required :nth-child
>> support in older browsers on any other html elements.
>>
>>
>>
>> </email>
>> <signature id="paceaux" name="Frank M. Taylor" twitter="@paceaux" />
>>
>> On Jun 12, 2013, at 2:11 PM, Tom Livingston wrote:
>>
>>> List,
>>>
>>> I use selectivizr frequently. Do you use this or something like it?
>>> What's your method for dealing with, for example, a lack of support
>>> for:
>>>
>>> p:nth-of-type(3n){
>>> color: red;
>>> }
>>>
>>> TIA!
>>>
>>> --
>
>
> I should add that I wrap selectivizr in a conditional for IE less than
> 8, so not everyone has to load it.
>
> Here's a typical use case:
>
> <style>
> .wrap div{width: 32%;margin-right:2%;float:left}
> .wrap div:last-of-type{margin-right:0;}
> </style>
>
> <div class="wrap">
> <div></div>
> <div></div>
> <div></div>
> </div>
>
> I prefer this over adding additional classes. Yes, here it's only one
> additional class, but you get the idea. In IE 8 the 3rd inner div
> would wrap below.
>
> --
>
> Tom Livingston | Senior Front-End Developer | Media Logic |
> ph: 518.456.3015x231 | fx: 518.456.4279 | mlinc.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/
______________________________________________________________________
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/