Ryflex Posted September 29, 2011 Share Posted September 29, 2011 Hi Guys and Girls, I have a weird thing here. I have got a small script which worked perfectly before I started using CSS. $message =' <CENTER> <FORM ID="Overdracht" NAME="Overdracht" METHOD="POST" ACTION="/standby/index.php"> <SELECT NAME="tijd"> <OPTION VALUE="18:00:00">18:00</OPTION> <OPTION VALUE="07:30:00">07:30</OPTION> </SELECT> <INPUT CLASS="input" TYPE="TEXT" NAME="overdracht" SIZE="15" ID="overdracht">belt voor de overdracht.<BR> <INPUT TYPE="SUBMIT" NAME="Submitoverdracht" ID="Submitoverdracht" VALUE="Log overdracht"></INPUT> </CENTER> <?php '; It always looked like: Selector Input field text Button Since I'm using CSS it looks like this: Selector input field text button What am I doing wrong??? Here's my CSS sheet: body { background-image:url('images/background.jpg'); background-repeat:repeat-x; font-family:verdana; } table, td { font-family:verdana; } ul { list-style-type:none; margin:0 auto; padding:0; width:800px; overflow:hidden; } li { float:left; } a:link,a:visited { display:block; width:180px; font-family:Verdana; font-weight:bold; color:rgb(0,51,111); background-color:rgb(242,147,46); text-align:center; padding:4px; text-decoration:none; text-transform:uppercase; } a:hover,a:active { color:rgb(242,147,46); background-color:rgb(0,51,111); } input { display:block; width:148px; font-family:Verdana; font-weight:bold; color:rgb(0,51,111); background-color:rgb(242,147,46); text-align:center; padding:2px; text-decoration:none; text-transform:uppercase; border:none; } input:hover,input:active { color:rgb(242,147,46); background-color:rgb(0,51,111); } .input, .input:hover { font-family:verdana; font-size:14px; color:black; background-color:white; text-align:left; text-decoration:none; font-weight:normal; text-transform:none;" } And the code where $message is being echoed: <TABLE border=1> <TR> <TD> <DIV ALIGN="left"> <FORM ID="Invoer" NAME="Invoer" METHOD="POST" ACTION="/standby/index.php"> <INPUT TYPE="SUBMIT" NAME="OCE" ID="OCE" VALUE="OCE"></INPUT> <INPUT TYPE="SUBMIT" NAME="OCEoverdracht" ID="OCEoverdracht" VALUE="OCE overdracht"></INPUT> <BR> <INPUT TYPE="SUBMIT" NAME="2e" ID="2e" VALUE="2e Kamer"></INPUT> <INPUT TYPE="SUBMIT" NAME="Oldelft" ID="Oldelft" VALUE="Oldelft"></INPUT> <INPUT TYPE="SUBMIT" NAME="Winvision" ID="Winvision" VALUE="Winvision"></INPUT> <INPUT TYPE="SUBMIT" NAME="Cargonaut" ID="Cargonaut" VALUE="Cargonaut"></INPUT> </FORM> <BR> <BR> </DIV> </TD> <TD WIDTH="800"> <?php echo $message; ?> </TD> </TR> </TABLE> Quote Link to comment https://forums.phpfreaks.com/topic/248101-css-fault-or-am-i-stupid/ Share on other sites More sharing options...
AyKay47 Posted September 29, 2011 Share Posted September 29, 2011 well to be honest im not really sure what layout you are trying to show here.. however it seems that you are getting unexpected breaks because you set your elements display to "block" which will create a line break before and after the element.. Quote Link to comment https://forums.phpfreaks.com/topic/248101-css-fault-or-am-i-stupid/#findComment-1274007 Share on other sites More sharing options...
Ryflex Posted September 29, 2011 Author Share Posted September 29, 2011 ok nice!! Changed display:block to display:inline-block Problem solved Thanks AyKay47 Quote Link to comment https://forums.phpfreaks.com/topic/248101-css-fault-or-am-i-stupid/#findComment-1274025 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.