Jump to content

How do I center align submit button withm CSS?


volitics

Recommended Posts

Can anybody tell me how to align a submit button on an Html page?The W3 Schools web site says that the use of align="center" with the <p> tag is deprecated and to use styles instead.http://www.w3schools.com/tags/tag_p.aspThere is a CSS command that says "align-text: center" that can be used with the <p> tag. Is it proper to use the align-text: center command with the submit button - which is not text?Thanks.

Link to comment
Share on other sites

croatiankid;Thanks for responding to my question.Here's what I'm doing:

<html><head><style type="text/css">div.submit{text-align:center;padding-top: 1.0cm;}</style></head><body><div class="submit"><input type="submit" name="Submit" value="Click" /></div></body></html>

It seems to be working.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...