Comments css?!

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
TNTH

Comments css?!

Post by TNTH »

I've tried many things now, but I just can't find out what kind of code to use in css to change the width of the textarea used in the commentsmodule.

I've tried the following:

Code: Select all

.cms-comments-textarea {
	width: 400px;
	height: 60px;
}

.comments-textarea {
	width: 400px;
	height: 60px;
}

.comments textarea {
	width: 400px;
	height: 60px;
}
And all those things without a "s" at the end of the word "comments", but it just won't work.
Alex_Leipzig

Re: Comments css?!

Post by Alex_Leipzig »

Maybe that's a stupid answer, but in comments.module.php there's no class referring to the textarea...
iNSiPiD

Re: Comments css?!

Post by iNSiPiD »

TNTH, that is your answer then.

Wrap the module insert tag {comments} in a div with id=#comment. Then create a CSS id like so:

Code: Select all

#comments  textarea {
	width: 400px;
	height: 60px;
}
This is all assuming that the textarea hasn't already been given a size in the HTML output.
TNTH

Re: Comments css?!

Post by TNTH »

Many thanks guys, I got it working!
User avatar
fredt
Forum Members
Forum Members
Posts: 144
Joined: Mon Jun 27, 2005 10:36 am
Location: Southern France

Re: Comments css?!

Post by fredt »

To be more precise : add on top of code in "Comment display template" and "Submit form template" tabs.

I'm not a CSS guru (not anything's guru...), so iNSiPiD's "in a div with id=#comment" ruined my day ...  ;)

I think this should be put in the Forge.

It also would be nice to give some CSS examples (size, colours...) for this in the module's Help, so it's just cut'n'pasted in Form css (or any other...)
bafl

Re: Comments css?!

Post by bafl »

I've tried the same thing but inline:





But it returns the following:

Fatal error: Smarty error: [in content:content_en line 3]: syntax error: unrecognized tag: width:400;height:100) -->  {cms_module module='Comments' number='10' dateformat='D d M y' emailfield=1 websitefield=1 (Smarty_Compiler.class.php, line 436) in /home/httpd/vhosts/loribreeders.com/httpdocs/lib/smarty/Smarty.class.php on line 1095

What Am I doing wrong here?

YT
cyberman

Re: Comments css?!

Post by cyberman »

Please try this

Code: Select all

{literal}<style type="text/css">
<!--
textarea {width:400px;height:100px)
-->
</style>{/literal}
Smarty (CMSms template engine) tried to parse your style. But smarty does not unterstand so you have to mask it ...
User avatar
Elijah Lofgren
Power Poster
Power Poster
Posts: 811
Joined: Mon Apr 24, 2006 1:01 am
Location: Deatsville, AL

Re: Comments css?!

Post by Elijah Lofgren »

fredt wrote: To be more precise : add on top of code in "Comment display template" and "Submit form template" tabs.

I'm not a CSS guru (not anything's guru...), so iNSiPiD's "in a div with id=#comment" ruined my day ...  ;)

I think this should be put in the Forge.

It also would be nice to give some CSS examples (size, colours...) for this in the module's Help, so it's just cut'n'pasted in Form css (or any other...)
I'd be glad to add some examples to the Comments help. Mind pasting your CSS code so that I could just add that? I don't feel like writing up some example CSS code as I use the Comments module unstyled.  ;)
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. :)
Locked

Return to “Modules/Add-Ons”