[Slightly OT] CSS with wildcard?

Sorry if this is a simple question, I’m a CSS noob.

I have a rails app that is displaying posts, I am having it generate
each post with its own div like “post_19”, “post_20”, etc.

I could make it so it puts another div around that div (i need the
individual post div’s for deletion with AJAX) but would rather not.
Is there some way to use CSS to do something like this…

post_* {

…some settings…

}

I know this doesn’t work, I tried it, but is there some way to
accomplish this functionality?

Thanks!
~Jamie

On Thu Jul 20, 2006 at 08:04:49PM -0700, Jamie Q. wrote:

}

I know this doesn’t work, I tried it, but is there some way to accomplish this functionality?

CSS selector syntax is a language in itself.
http://www.google.com/search?hl=en&q=css+selector+syntax&btnG=Google+Search

you might be able to smash open the pandora’s box even wider with
XQuery…

On Jul 21, 2006, at 12:04 , Jamie Q. wrote:

I know this doesn’t work, I tried it, but is there some way to
accomplish this functionality?

Assuming your post_\d+ are post ids, what I would do is have a post
(CSS) class.

HTML is something like:

To style all of the posts, your CSS would look something like:

.post { … }

Note preceding period.

Just a reminder, to select the element with id=“post_19”, you’d use

#post_19 { … }

Does this accomplish what you want?

Michael G.
grzm seespotcode net

What Michael said. There’s no wildcard for matching part of an id
name, and, as Michael shows, that’s exactly what classes are for -
describing a generic kind of element.