Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

News

Welcome to Yet Another Programming Community!

 
Pages: [1]   Go Down Print
Author Topic: Centering forms?  (Read 210 times)
ReCreate
Full Member
***

Karma: +2/-24
Offline Offline

Posts: 161


GML/PHP/C++/VB6/Turing Programmer

recretae123@gmail.com
View Profile WWW
« on: November 24, 2009, 10:51:35 PM »

I have something along the lines of.
Code:
<form action="whatever.php" method="post" >
                         Name: <input type="text" name="name"><br>
                         Comment: <br><textarea rows=4 cols=30 name="comment"></textarea><br>
                         <input type="Submit" >
                     </form>
But I am unsure how to center it, I don't want to use the <center> tags because it is depreciated, and means for invalid HTML.
After a few hours of google searching, I figured it's something using CSS.
Can someone show me how this is done?
Thanks.
~ReCreate
Logged

tuntis
Newbie
*

Karma: +2/-6
Offline Offline

Posts: 27


View Profile
« Reply #1 on: November 25, 2009, 08:54:10 AM »

Code:
text-align: center;
Logged
ReCreate
Full Member
***

Karma: +2/-24
Offline Offline

Posts: 161


GML/PHP/C++/VB6/Turing Programmer

recretae123@gmail.com
View Profile WWW
« Reply #2 on: November 25, 2009, 04:12:23 PM »

Doesn't that say text-align: center;?
Anyways, I got it figured out yesterday, But it was late and I did not post about it.
Logged

tuntis
Newbie
*

Karma: +2/-6
Offline Offline

Posts: 27


View Profile
« Reply #3 on: November 26, 2009, 09:38:25 AM »

Doesn't that say text-align: center;?
Your point being?
Logged
TheMagicNumber
Full Member
***

Karma: +1/-25
Offline Offline

Posts: 123

What?


View Profile
« Reply #4 on: November 27, 2009, 07:20:18 AM »

If that aligned the TEXT in your form, it should include the rest, too.
Logged

kamen
Newbie
*

Karma: +0/-0
Offline Offline

Posts: 8


View Profile Email
« Reply #5 on: December 08, 2009, 11:18:19 PM »

if you want to center the forum not the text in the forum use:
Code:
margin: 0 auto;

I think for ie6 I think you can use
Code:
text-align:center;
outside of the forum to center it on the page... may not need to do that though.
Logged
Pages: [1]   Go Up Print
 
Jump to:  

 
     
Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Theme by Roach
Valid XHTML 1.0! Valid CSS!