News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Specific CSS rule

Started by Tristan Perry, July 26, 2005, 08:10:31 AM

Previous topic - Next topic

Tristan Perry

Hello all,
  I want to be specific with one of my CSS rules. I am working on a theme for SMF, and want to style the editor, for the post view only:

<textarea class="editor" name="message" rows="12" cols="60"...

If I use:


textarea.editor
{
  /* stuff */
}


For the CSS, it will still style things like the edit signature box in profile view:

<textarea class="editor" onkeyup="calcCharLeft();" name="signature"...

My question is, with CSS, can I be more specific with my CSS rules, so that only textareas with the class of "editor", and the name "message" will be styled? I can't think of how to do this, is it possible? Or do I have to edit the Post.template.php file so that the class of the editor is unique?
Thanks,
Tau Online

[Unknown]

Usually, you'd use an id for that.  Trouble is, those have to be relatively unique... and there comes in the problem with generated content.

-[Unknown]

Tristan Perry

Sure, thanks Unknown. I'll edit the Post template file then.

Tim


Advertisement: