DStrohma
Member
Posted 2 years ago #
hi all,
my problem is, i want to center the form. i know that i can just add <center> to the whole thing, but then all elements of the form are centered. thats not exactly what i want...
i want to center the whole form-block WITHOUT centering the included fields. like this: http://www.david-strohmayer.net/problem.png
any ideas?
thx
DStrohma
Member
Posted 2 years ago #
no ideas?? please help :))
pinkspiders
Member
Posted 2 years ago #
Not sure but you could try using text indents"
<html>
<head>
<style type="text/css">
p {text-indent:50px}
</style>
</head>
<body>
text
</body>
</html>
pinkspiders
Member
Posted 2 years ago #
sorry - Didn't work but does look kinda cool.
ntrantham
Member
Posted 2 years ago #
I got this to work.
add <div align="center"> </div> around the whole thing...
and change:
<p> </p>
to:
<p style="text-align: center"> </p>
Works as seen on my site here:
http://localhub.com/?page_id=22
It even centered the wp-recaptcha plugin.
ntrantham
Member
Posted 2 years ago #
Here is the code for my form:
<div align="center">
<p style="text-align: center">Your Name (required)<br />
[text* your-name] </p>
<p style="text-align: center">Your Email (required)<br />
[email* your-email] </p>
<p style="text-align: center">Subject<br />
[text your-subject] </p>
<p style="text-align: center">Your Message<br />
[textarea your-message] </p>
<p style="text-align: center">[recaptcha your-recaptcha]</p>
<p style="text-align: center">[submit "Send"]</p>
</div>
Wrap the form with:
<div style="margin: 0 auto;">
your stuff here
</div>
If you need a set width, do (replacing 750 with whatever you want):
<div style="margin: 0 auto; width:750px">
your stuff here
</div>