Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-20 12:53:29

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

add css to comment form tags

Hi again!
I’m searching how to add CSS to the comments form tags.
If I do this: <txp:comment_name_input style="background-color:#cccccc;" />
it’s not working and even don’t show up nothing on the page.

so I will love to know how to add style to the comment form tags please?

Thanks :)

Offline

#2 2008-04-20 13:30:27

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: add css to comment form tags

In example:

input#name {
	background: #ccc;
}

Don’t use inline styles, use Style Sheets.

Last edited by Gocom (2008-04-20 13:33:06)

Offline

#3 2008-04-20 13:52:19

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

Re: add css to comment form tags

works great!
but how do I control the style of the submit & preview buttons too please?

Offline

#4 2008-04-20 14:13:14

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: add css to comment form tags

Look at the output XHTML source, and you will see that there is regular XHTML-tags that can be styled:

<input type="submit" name="preview" value="" class="button" id="txpCommentPreview" />
<input type="submit" name="submit" value="" class="button disabled" id="txpCommentSubmit" disabled="disabled" />

So, we get example list of selectors, actual list is quite long:

  • .disabled
  • .button
  • #txpCommentSubmit
  • #txpCommentPreview

And so-on.

Last edited by Gocom (2008-04-20 14:13:40)

Offline

#5 2008-04-20 14:17:57

THE BLUE DRAGON
Member
From: Israel
Registered: 2007-11-16
Posts: 637
Website

Re: add css to comment form tags

cool thank you very much :)

Offline

Board footer

Powered by FluxBB