Forum

Thread tagged as: Question

Textarea css

I have a page with 2 textareas - the first needs the p text to be black and the second needs it to be white.

I have p is set to black and a class of .white-text in my css file.

I know that textarea sets <p> tags but I cant manage to apply the .white-text class to it. I cant replace the textarea with "text" as there are several paragraphs.

I have tried wrapping the content area in a <div class="white-text> </div> and I have tried adding .white-text to my template (the text works, not the textarea ) but neither works.

 <h1 class="white-text"><perch:content id="heading" type="text" label="Heading" required="true" title="true" /></h1>
 <perch:content id="text" type="textarea" class="white-text" label="Text" markdown="true" editor="simplemde" imagewidth="640" imageheight="480" />

I know this is really a markdown/textarea/css issue - I just cant believe there isnt some way to make something so simple work! I havent found a solution in the forum, but if anyone knows how to get round this, I would be very grateful!

cow shed

cow shed 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You'd do as you describe, wrap the paragraphs in a container with the class applied.

<div class="white-text">
<perch:content id="text" type="textarea" label="Text" markdown="true" editor="simplemde" imagewidth="640" imageheight="480" />
</div>

Thanks for confirming I was on the right lines. I also had to add .white-text p{color: white;} and now its all working!!