Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
CSS: Styling the first post
Hey guys,
I've been working on a layout design in Photoshop for the past few days, using the default Vanilla template as a base. Upon getting to the discussion page, I thought of having the first post - that belonging to the discussion starter, styled differently from the rest. For example, every post could have the standard white background with black text, but for the first post to have a blue background with white text. CSS isn't necessarily an issue for me, and I can style very well. It's just a matter of how to get the first post to style differently and not have that style follow on with other posts.
I'd really appreciate it if someone could guide me on whether this can be done or not, and if so, how. Thanks in advance! Oh and if it's not too clear what I've intended just let me know and I'll do a mockup design of what I mean.
I've been working on a layout design in Photoshop for the past few days, using the default Vanilla template as a base. Upon getting to the discussion page, I thought of having the first post - that belonging to the discussion starter, styled differently from the rest. For example, every post could have the standard white background with black text, but for the first post to have a blue background with white text. CSS isn't necessarily an issue for me, and I can style very well. It's just a matter of how to get the first post to style differently and not have that style follow on with other posts.
I'd really appreciate it if someone could guide me on whether this can be done or not, and if so, how. Thanks in advance! Oh and if it's not too clear what I've intended just let me know and I'll do a mockup design of what I mean.
0
This discussion has been closed.
Comments
you have to edit /themes/comments.php, so I'd recommend (as suggested in the documentation) to create a new folder in /themes and copy the file into it.
then add this
if ($Comment->CommentID == $this->Discussion->FirstCommentID) $CommentClass .= ' FirstComment';
just before this (around line 72)$CommentClass = trim($CommentClass);
and now you can do the css styling on the FirstComment class