使用 modx 中的 eForm 更改字体并为字体添加颜色
只是想补充一点,这是电子表格的代码。不知道在哪里使用 CSS。我需要编辑页面的主要 css 吗?
我怎样才能改变这个代码的字体?为文本添加颜色,我将其用于在 modx 中创建的 eForm
<div style="background-color:#CCDFED">
<form method="post" action="[~[*id*]~]">
<input type="hidden" name="formid" value="registrationForm" />
<table>
<tr>
<td><label for="reasons" style="margin:0.5em">Reason for contacting us:</label></td>
<td><textarea cols="60" rows="3" name="reasons" eform="Reasons::1"></textarea></td>
</tr>
<tr>
<td><label for="products" style="margin:0.5em">Which sweets </label>
<label style="margin:0.5em">do you like:</label>
<td>
<input type="checkbox" name="products[]" value="icecream" eform="Sweets::1"/>	Ice Cream <br/>
<input type="checkbox" name="products[]" value="bananasplit" />	bananasplit<br/>
</td>
</tr>
<tr>
<td><label for="how" style="margin:0.5em">How did you hear about us:</label></td>
<td>
<select name="how" style="width:200px" eform="How::1" >
<option value="web_search">Web search</option>
<option value="friends">Friends</option>
<option value="word_of_mouth">Word of Mouth</option>
</select>
</td>
</tr>
</table>
</form>
</div>
just would like to add that, this is the code for the eForm. Not sure where to use the CSS. Do I need to edit the main css of the page?
how can I change the font on this code & add color to the text, I'm using this to the eForm created in modx
<div style="background-color:#CCDFED">
<form method="post" action="[~[*id*]~]">
<input type="hidden" name="formid" value="registrationForm" />
<table>
<tr>
<td><label for="reasons" style="margin:0.5em">Reason for contacting us:</label></td>
<td><textarea cols="60" rows="3" name="reasons" eform="Reasons::1"></textarea></td>
</tr>
<tr>
<td><label for="products" style="margin:0.5em">Which sweets </label>
<label style="margin:0.5em">do you like:</label>
<td>
<input type="checkbox" name="products[]" value="icecream" eform="Sweets::1"/> Ice Cream <br/>
<input type="checkbox" name="products[]" value="bananasplit" /> bananasplit<br/>
</td>
</tr>
<tr>
<td><label for="how" style="margin:0.5em">How did you hear about us:</label></td>
<td>
<select name="how" style="width:200px" eform="How::1" >
<option value="web_search">Web search</option>
<option value="friends">Friends</option>
<option value="word_of_mouth">Word of Mouth</option>
</select>
</td>
</tr>
</table>
</form>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您最好在官方 modx 论坛中提出这个问题:http://modxcms.com/forums/
但简单的答案是:使用 CSS。
从块中删除内联样式替换为 css class 或 id 规则,然后您可以从 CSS 表控制显示。
如果这是带有插件/额外等的默认块,请始终使用它的副本,否则更新会清除您的自定义设置。
另外,革命或进化与进化版本号对我们其他人很有帮助。
-肖恩
You are best off to ask this question in the official modx forums: http://modxcms.com/forums/
but the simple answer is: use CSS.
remove your inline styles from the chunk & replace with css class or id rules, then you can control the display from your CSS sheet.
if this is a default chunk with the plugin/extra etc, always work on a copy of it or updates will wipe your customizations away.
Also, Revolution or Evolution & version numbers is helpful to the rest of us.
-sean