Jump to content

Jerry62704

Members
  • Posts

    321
  • Joined

  • Last visited

Posts posted by Jerry62704

  1. need to center part of the form. this in style sheet:
    p.center { text-align: center; }

    form:

    <div style="background-color:#FFFFFF; padding:10px" class="rounded {10px}">//class is jquery script that's working fine. <form name="myform" method="post" action="action.php"><p>First Name: <input type="text" name="name" value="<?php echo $post_name;?>" class="buttonsb"/></p<p class="center">Write something: </br></br><textarea name="message" rows="2" cols="35" class="buttonsb"></textarea><input type="hidden" name="searching" value="yes" /></br><input type="submit" value="Process" class="buttons"></form></p><p class="center">this works</p>

    What is <p> going to be centered in? More importantly, how do you define "center"?Let's assume that you want it to look like this (periods are to be seen as spaces):|...First name: [input box].........||....Last name: [input box].........||...........Write something...........||....[....................................]....||....[....................................]....|(assuming the bars line up) - is that it?If so, then you want the First name and Last name in a div (because you want a specific placement) so it might look like (off the cuff):<div class="inputText">First Name: <input...></div><div class="inputText">Last Name: <input...></div><div class="centerText">Write something</div>where.inputText {width:xxx; margin: 0 auto;}.centerText {width:30%; margin:0 auto;}
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Home</title><style type="text/css">* {	border: 0;	margin: 0;	padding: 0;	}.textCenter {	width: 50%;	margin: 0 auto;	}.inputText {	width: 70%;	margin: 0 auto;	}div {	width:100%;	}</style></head><body><div>	<form action="post">		<div class="inputText">			First Name:			<input type="text"></input>		</div>		<div class="inputText">			Last Name:			<input type="text"></input>		</div>		<div class="textCenter">			Write stuff		</div>		<div class="textCenter">			<textarea rows="4" cols="4"></textarea>		</div>	</form><div></body></html>

×
×
  • Create New...