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!
--
Tom Livingston | Senior Front-End Developer | Media Logic |
ph: 518.456.3015x231 | fx: 518.456.4279
Are you using it for anything mission critical? Personally, I let
something like that gracefully degrade. Or, looking at:
http://caniuse.com/#search=nth-
Seems like contemporary browsers have a handle on that. Sometimes I'll
just make sure there's an alternative option (or, it degrades
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
On Wed, Jun 12, 2013 at 4:31 PM, Frank Taylor pace...@madebypaceaux.com 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.
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 +
On Wed, Jun 12, 2013 at 4:50 PM, Frank Taylor pace...@madebypaceaux.com wrote:
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
Your one and only caveat is IE7: if there are HTML comments between the divs,
then the adjacent sibling selector doesn't work.
In the one case where our CMS was kicking out comments, I reverted to the
non-adjacent selector:
.wrap div ~ div ~ div {margin-right:0;}
Mind you, if you're
I'm just curious, is there a css3 selector for previous siblings? And if there
is, how widely supported is it?
It'd be useful for styling paragraphs that come before (introducing) lists for
instance.
---Tim Climis
Computer Coordinator
International Services
On Thu, March 26, 2009 1:21 pm, Climis, Tim wrote:
I'm just curious, is there a css3 selector for previous siblings? And if
there is, how widely supported is it?
It'd be useful for styling paragraphs that come before (introducing) lists
for instance.
No, but you could achieve the same
I'm just curious, is there a css3 selector for previous siblings? And if
there is, how widely supported is it?
---
Yes! There is.
Sintax is:
ul ~ p {...} matches p elements that comes
Ops! My fault on previous email:
Sintax is:
ul ~ p {...} matches p elements that comes AFTER ul elements.
MaurĂcio
__
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ
you could achieve the same thing (for the example you give) using
CSS2.1 adjacent-sibling selectors [1]:
p + ul {
font-style: italic;
}
From the spec:
Adjacent sibling selectors have the following syntax: E1 + E2, where E2 is
the subject of the selector. The selector matches if E1
On Thu, March 26, 2009 2:03 pm, Climis, Tim wrote:
Unless I'm misreading the spec, that would match the ul and make my list
text italicized, which isn't what I want. I want to match the p.
DOH! Yes, I fail - sorry :-(
Well, it is lunchtime...
--
Nick Fitzsimons
http://www.nickfitz.co.uk/
On Mar 26, 2009, at 10:06 AM, Mauricio ((Maujor)) Samy Silva wrote:
I'm just curious, is there a css3 selector for previous siblings?
And if
there is, how widely supported is it?
--
On Mar 26, 2009, at 10:21 PM, Climis, Tim wrote:
I'm just curious, is there a css3 selector for previous siblings?
And if there is, how widely supported is it?
It'd be useful for styling paragraphs that come before (introducing)
lists for instance.
Nope, nothing like that exists.
Climis, Tim wrote:
pThese are the things you need to bring:/p
ul
liBananas/li
liPie/li
/ul
Unless I'm misreading the spec, that would match the ul and make my list
text italicized, which isn't what I want. I want to match the p.
Something like E1 + E2, where E1 is the subject of
Ops! My fault on previous email:
Sintax is:
ul ~ p {...} matches p elements that comes AFTER ul elements.
Yeah, my testing had just discovered that. :( Digging into the spec to see
what was up, it looks like there's not a selector for what I want. Maybe
because it would need a second
ul ~ p {...} matches p elements that comes AFTER ul elements.
The ~ matches all the p elements after a ul element. The + matches a p
element immediately after a ul element.
What about doing it backwards then put a class on the p and target the
following ul
Climis, Tim wrote:
I'm just curious, is there a css3 selector for previous siblings?
And if there is, how widely supported is it?
It'd be useful for styling paragraphs that come before (introducing)
lists for instance.
None exists, but you could use jQuery to do it:
style type='text/css'
What about doing it backwards then put a class on the p and target the
following ul
What I'm going for is to take the bottom margin off of a paragraph preceding a
list. I don't need the list to be styled any differently, so there's no reason
to target it at all.
Here's a list:
* Something
*
You should use h* elements instead of p elements for any kind of
header. You might then not need to specify any classes and it's more
semantically correct
What I'm going for is to take the bottom margin off of a paragraph
preceding a list. I don't need the list to be styled any
You should use h* elements instead of p elements for any kind of
header. You might then not need to specify any classes and it's more
semantically correct
Sent from my iPhone
On Mar 26, 2009, at 9:21 AM, Climis, Tim tcli...@indiana.edu wrote:
What about doing it backwards then put a class
Scott has a valid point here. Maybe this is the way you should be doing it.
Also is it possible to make up ones own elements? That's sorta what XML is
right? If you could do that then you can style it just like a p or h1 tag.
He does. And I may do that. I'm not using h6 for anything on this
What I'm going for is to take the bottom margin off of a paragraph
preceding a list. I don't need the list to be styled any
differently, so there's no reason to target it at all.
Here's a list:
* Something
* Something else
Instead of:
Here's a list:
*something
*something else
Climis, Tim wrote:
What about doing it backwards then put a class on the p and target the
following ul
What I'm going for is to take the bottom margin off of a paragraph preceding
a list. I don't need the list to be styled any differently, so there's no
reason to target it at all.
How about *adding* a negative top margin to the UL? viz:
An interesting idea that I had not thought of. It would work though.
---Tim
__
css-discuss [cs...@lists.css-discuss.org]
On 27/03/2009, at 4:26 AM, Climis, Tim wrote:
But there are a few things I wish for that would make even more
semantic sense. A. lists contained in paragraphs, or B. a list
header element (like thead or th) ullh/lh li/li /ul
Perhaps a definition list could be styled to achieve what you
Someone I know came to me with a problem: he wants his print
stylesheet to not apply a style when a link contains an image.
Here's some sample HTML to explain the problem:
a id=anchor name=anchor/a
pa href=http://flickr.com;img
src=http://flickr.com/foo/picture-ID; //a/p
pHere is an a
Dylan Wilbanks wrote:
I thought that using the :not selector was the solution:
a:not([href*=flickr]):before {
content: [;
color: #000;
text-decoration: none;
}
a:not([href*=flickr]):after {
content: attr(href) ] ;
color: #000;
text-decoration: none;
}
But
On Wed, 28 Jan 2009 11:54:09 -0800, Dylan Wilbanks wrote:
Someone I know came to me with a problem: he wants his print stylesheet to
not apply a
style when a link contains an image.
[sample code stripped]
The generated content appears around the example link AND the linked image
when you
30 matches
Mail list logo