Page 1 of 1

Comments css?!

Posted: Sun Jun 05, 2005 4:50 pm
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.

Re: Comments css?!

Posted: Tue Jun 07, 2005 9:01 pm
by Alex_Leipzig
Maybe that's a stupid answer, but in comments.module.php there's no class referring to the textarea...

Re: Comments css?!

Posted: Wed Jun 08, 2005 2:15 am
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.

Re: Comments css?!

Posted: Wed Jun 08, 2005 2:09 pm
by TNTH
Many thanks guys, I got it working!

Re: Comments css?!

Posted: Fri Jul 21, 2006 3:24 pm
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...)

Re: Comments css?!

Posted: Tue Aug 01, 2006 8:42 am
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

Re: Comments css?!

Posted: Tue Aug 01, 2006 9:10 am
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 ...

Re: Comments css?!

Posted: Thu Aug 03, 2006 6:54 pm
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.  ;)