如何在表格标题中将标题居中? [英] How do i center the heading in my form heading?

查看:116
本文介绍了如何在表格标题中将标题居中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用center标签将标题设为请注册您的详细信息".它可以像我想要的那样完美地工作,但是它无法通过验证.其他人知道我可以使用什么吗?

I am using the center tag to center a heading in my form, "Please register your details". It works perfectly like I want it to but it fails the validation. Does any one else know what I could use?

<form method = "post" action = "mailto:info@ncirl.ie">

<fieldset>

<legend><center><b>Please Register Your Details</b></center></legend>

推荐答案

而不是使用<center>会迫使您的设计永远居中,您应该在CSS中处理它:

Instead of using <center> which will force your design to be centered forever, you should deal with it in CSS:

form legend { text-align:center;font-weight:bold; }

这篇关于如何在表格标题中将标题居中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆