AXiSS Posted January 2, 2007 Share Posted January 2, 2007 I see a lot of pages where the login and register forms are set up where the text is right aligned next to the forms and it is all centered. I think this is done with CSS somehow, but dont know how. Can I get some help on how to create one of these aesthetic form setups? Quote Link to comment https://forums.phpfreaks.com/topic/32623-simple-formtext-alignment/ Share on other sites More sharing options...
freakykiwi Posted January 4, 2007 Share Posted January 4, 2007 [code]<html><head><title>Centre align</title></head><body><form name="form1" method="post" action=""> <div align="center"> like this? <input type="text" name="textfield"> </div></form></body></html>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/32623-simple-formtext-alignment/#findComment-152585 Share on other sites More sharing options...
AXiSS Posted January 5, 2007 Author Share Posted January 5, 2007 No, not a center align, look at this page: http://bulfleet.com/register.phpSee how all their forms and text are ligned up? Quote Link to comment https://forums.phpfreaks.com/topic/32623-simple-formtext-alignment/#findComment-153228 Share on other sites More sharing options...
AndyB Posted January 5, 2007 Share Posted January 5, 2007 view-source shows the html and the CSS can be viewed as well. That'll explain it all. Quote Link to comment https://forums.phpfreaks.com/topic/32623-simple-formtext-alignment/#findComment-153232 Share on other sites More sharing options...
AXiSS Posted January 5, 2007 Author Share Posted January 5, 2007 OK, I'll take a look at it. Quote Link to comment https://forums.phpfreaks.com/topic/32623-simple-formtext-alignment/#findComment-153474 Share on other sites More sharing options...
Ninjakreborn Posted January 10, 2007 Share Posted January 10, 2007 http://jeffhowden.com/code/css/forms/I found this very helpful awhile back, when I started using tables for forms themselves. I got tired of doing it, so I did some research and found that, it solved all my problems, even for small login forms, and allowed me to branch off to even better more customized styles. Read that slowly, and understand it all, then you shouldn't have problem with form styling even more, it even covers cross browser issues. Quote Link to comment https://forums.phpfreaks.com/topic/32623-simple-formtext-alignment/#findComment-157531 Share on other sites More sharing options...
AXiSS Posted January 13, 2007 Author Share Posted January 13, 2007 [quote author=businessman332211 link=topic=120751.msg501511#msg501511 date=1168454720]http://jeffhowden.com/code/css/forms/I found this very helpful awhile back, when I started using tables for forms themselves. I got tired of doing it, so I did some research and found that, it solved all my problems, even for small login forms, and allowed me to branch off to even better more customized styles. Read that slowly, and understand it all, then you shouldn't have problem with form styling even more, it even covers cross browser issues.[/quote]I didn't have much luck decoding that. Quote Link to comment https://forums.phpfreaks.com/topic/32623-simple-formtext-alignment/#findComment-159605 Share on other sites More sharing options...
cmgmyr Posted January 13, 2007 Share Posted January 13, 2007 Try this out. You will need to add a few more things, but I think you'll get the idea...[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>CSS Forms</title><style type="text/css"><!--body{ background-color:#000000;}#form_wrapper{ width:500px;}.left_form{ width:50%; float:left; text-align:right;}.right_form{ width:50%; float:left; text-align:left;}.left_hdr{ color:#FFFFFF; font-weight:bold; font-size:12px;}.left_text{ color:#999999; font-size:9px;}.clear{ clear:both;}--></style></head><body><form action="process.php" method="post"><div id="form_wrapper"> <div class="left_form"> <div class="left_hdr">Your Name</div><!-- End left_hdr--> <div class="left_text">Please enter your name</div><!-- End left_text--> </div><!-- End left_form--> <div class="right_form"> <input name="name" type="text" /> </div><!-- End right_form--> <div class="clear"></div><!-- End clear--> </div><!-- End form_wrapper--></form></body></html>[/code]-Chris Quote Link to comment https://forums.phpfreaks.com/topic/32623-simple-formtext-alignment/#findComment-160004 Share on other sites More sharing options...
AXiSS Posted January 14, 2007 Author Share Posted January 14, 2007 OK, that makes more sense. Thanks for the help! Quote Link to comment https://forums.phpfreaks.com/topic/32623-simple-formtext-alignment/#findComment-160753 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.