Jump to content
  • 0

Перемещаем кнопку поиск (Search)


L4D2
 Share

Question

Не могу переместить кнопку поиска в правый бок от формы ввода текста.

Как выглядит:

P-kQ_wH2QAY.jpg

			<div class="mainSearch">				<form class="form-wrapper">					<input type="text" id="search" placeholder="Всегда готов для поиска..." required>					<input type="submit" value="Искать" id="submit">				</form>			</div>
.mainSearch{position:absolute;right:15%;top:4px;}.form-wrapper #search {	width: 90%;	height: 0px;	padding: 10px 5px;	font: bold 13px 'lucida sans', 'trebuchet MS', 'Tahoma';	border: 1px solid #ccc;	-moz-border-radius: 3px;	-webkit-border-radius: 3px;	border-radius: 3px;      }.form-wrapper #search:focus {	outline: 0; 	border-color: #aaa;	-moz-box-shadow: 0 1px 1px #bbb inset;	-webkit-box-shadow: 0 1px 1px #bbb inset;	box-shadow: 0 1px 1px #bbb inset;  }.form-wrapper #search::-webkit-input-placeholder {   color: #999;   font-weight: normal;}.form-wrapper #search:-moz-placeholder {	color: #999;	font-weight: normal;}.form-wrapper #search:-ms-input-placeholder {	color: #999;	font-weight: normal;} .form-wrapper #submit {	float: right;	border: 1px solid #00748f;	height: 20px;	width: 70px;	padding: 0;	cursor: pointer;	font: bold 15px Arial, Helvetica;	color: #fafafa;	/* text-transform: uppercase; */ /* Выделяет жирным большим текстом */  	background-color: #0483a0;	background-image: -webkit-gradient(linear, left top, left bottom, from(#31b2c3), to(#0483a0));	background-image: -webkit-linear-gradient(top, #31b2c3, #0483a0);	background-image: -moz-linear-gradient(top, #31b2c3, #0483a0);	background-image: -ms-linear-gradient(top, #31b2c3, #0483a0);	background-image: -o-linear-gradient(top, #31b2c3, #0483a0);	background-image: linear-gradient(top, #31b2c3, #0483a0);	-moz-border-radius: 3px;	-webkit-border-radius: 3px;	border-radius: 3px;      	text-shadow: 0 1px 0 rgba(0, 0 ,0, .3);}  .form-wrapper #submit:hover,.form-wrapper #submit:focus {			background-color: #31b2c3;	background-image: -webkit-gradient(linear, left top, left bottom, from(#0483a0), to(#31b2c3));	background-image: -webkit-linear-gradient(top, #0483a0, #31b2c3);	background-image: -moz-linear-gradient(top, #0483a0, #31b2c3);	background-image: -ms-linear-gradient(top, #0483a0, #31b2c3);	background-image: -o-linear-gradient(top, #0483a0, #31b2c3);	background-image: linear-gradient(top, #0483a0, #31b2c3);}	  .form-wrapper #submit:active {	outline: 0;    	-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;	-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5) inset;    }  .form-wrapper #submit::-moz-focus-inner {	border: 0;}

Как ее исправить, и поставить на правый фланг.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

 

А как между ними сделать отступ ?

используй, например, margin:

 

Делал, у меня форма ввода сдвигается вниз:

 

ceNDJhAstwg.jpg

.form-wrapper #search {margin: 4px;width: 180px;height: 18px;padding: 0 5px;font: bold 13px 'lucida sans', 'trebuchet MS', 'Tahoma';border: 1px solid #ccc;-moz-border-radius: 3px;-webkit-border-radius: 3px;border-radius: 3px;float:left;}
Edited by L4D2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy