Chrisj Posted November 19, 2009 Share Posted November 19, 2009 I'm simply trying to put a search box (form) on the same line as the word "Search:", but it appears underneath the word Search: instead of to the right of it in IE7. Any help will be appreciated. Thanks <font size="6" color="#666666" face="Arial">Search:</font><form method="get" action="search.php"><input type="hidden" name="type" value="images" /><input type="text" name="keyword" size="32" value="Search" id="sbi" onclick="clickclear(this, 'Search')" onblur="clickrecall(this,'Search')" style="font-family: verdana; font-weight:; font-size: 10pt; height: 18px; width:240px; color:#000000; letter-spacing: 1; border: 2px inset #F5F5F5; background-color: #ffffff" /><input type="submit" value="Search" name="B2" style="font-family: verdana; font-weight:; font-size: 10pt; width:88px; color:#FFFFFF; letter-spacing: 1; border: 1px inset #F5F5F5; background-color: #990000" /></form> Quote Link to comment https://forums.phpfreaks.com/topic/182079-form-wont-line-up-next-to-text/ Share on other sites More sharing options...
FaT3oYCG Posted November 19, 2009 Share Posted November 19, 2009 1) use css to style elements 2) have you placed it in a div? im guessing not as you havent used css but yano. Quote Link to comment https://forums.phpfreaks.com/topic/182079-form-wont-line-up-next-to-text/#findComment-960496 Share on other sites More sharing options...
Chrisj Posted November 19, 2009 Author Share Posted November 19, 2009 Can you please give me an example of what you're suggesting? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/182079-form-wont-line-up-next-to-text/#findComment-960540 Share on other sites More sharing options...
FaT3oYCG Posted November 19, 2009 Share Posted November 19, 2009 well i would really need you to post the whole code to see if i cold modify it with some div's and then it might take a further ammount of time to remove the styling from each item and place it in a css file, ill post some code when i get home. Quote Link to comment https://forums.phpfreaks.com/topic/182079-form-wont-line-up-next-to-text/#findComment-960831 Share on other sites More sharing options...
FaT3oYCG Posted November 19, 2009 Share Posted November 19, 2009 oh and for now this would work, i took the styles out but yano <!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> <title>Title</title> <meta http-equiv="Content-Type" content="text/html" /> <link rel="stylesheet" type="text/css" href="s.css" /> </head> <body> <form method="get" action="search.php"> <table> <tr> <td>Search:</td> <td><input type="hidden" name="type" value="images" /> <input type="text" name="keyword" size="32" value="Search" id="sbi" onclick="clickclear(this, 'Search')" onblur="clickrecall(this,'Search')" class="searchButton" style="background-color: #ffffff" /></td> <td><input type="submit" value="Search" name="B2" class="searchButton2" style="background-color: #990000" /></td> </tr> </form> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/182079-form-wont-line-up-next-to-text/#findComment-960832 Share on other sites More sharing options...
Chrisj Posted November 19, 2009 Author Share Posted November 19, 2009 Thanks Quote Link to comment https://forums.phpfreaks.com/topic/182079-form-wont-line-up-next-to-text/#findComment-961186 Share on other sites More sharing options...
JustLikeIcarus Posted November 20, 2009 Share Posted November 20, 2009 Using a label for the input will line it up automagically HTML: <div class="searchbox"> <form method="get" action="search.php" style="float:left;"> <input type="hidden" name="type" value="images" /> <label for"keyword">Search:</label> <input type="text" name="keyword" size="32" value="Search" id="sbi" onclick="clickclear(this, 'Search')" onblur="clickrecall(this,'Search')" /> <input type="submit" value="Search" name="B2" class="sub-button" /></form> </div> CSS: #sbi { font:normal 12px verdana; height: 18px; width:240px; color:#000000; letter-spacing: 1; border: 2px inset #F5F5F5; background-color: #ffffff; } .sub-button{ font:normal 12px verdana; width:88px; color:#FFFFFF; letter-spacing: 1; border: 1px inset #F5F5F5; background-color: #990000 } .searchbox label { font-size:30px; color:#666; } Quote Link to comment https://forums.phpfreaks.com/topic/182079-form-wont-line-up-next-to-text/#findComment-961912 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.