0 Пользователей и 1 Гость просматривают эту тему.
  • 3 Ответов
  • 1183 Просмотров
*

saschka

  • Захожу иногда
  • 169
  • 1 / 0
Всем привет!
Очень хочется иметь заметный поиск по сайту, чтобы строка поиска была во всю ширину шаблона, адаптивной в зависимости от размера экрана и при этом была какая-нибудь обводочка красным цветом. Есть у кого-то решение?
*

saschka

  • Захожу иногда
  • 169
  • 1 / 0
у всех есть.
CSS называется.

А если в CSS вот такое:
Код
/* ========================================================================
   Component: Search
 ========================================================================== */
/*
 * 1. Create position context for dropdowns
 * 2. Needed for `form` element
 */
.uk-search {
  display: inline-block;
  /* 1 */
  position: relative;
  /* 2 */
  margin: 0;
}
/*
 * Icon
 */
.uk-search:before {
  content: "\e600";
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  line-height: 40px;
  text-align: center;
  font-family: FontAwesome;
  font-size: 20px;
  color: #cccccc;
  font-family: Avion;
}
/* Sub-object `uk-search-field`
 ========================================================================== */
/*
 * Removes inner padding and border in Firefox 4+.
 */
.uk-search-field::-moz-focus-inner {
  border: 0;
  padding: 0;
}
/*
 * Remove inner padding and search cancel button in Chrome, Safari and Opera on OS X.
 */
.uk-search-field::-webkit-search-cancel-button,
.uk-search-field::-webkit-search-decoration {
  -webkit-appearance: none;
}
/*
 * Removes cancel button in IE10
 */
.uk-search-field::-ms-clear {
  display: none;
}
/*
 * Removes placeholder transparency in Firefox.
 */
.uk-search-field::-moz-placeholder {
  opacity: 1;
}
/*
 * 1. Define consistent box sizing.
 * 2. Address margins set differently in Firefox/IE and Chrome/Safari/Opera.
 * 3. Remove `border-radius` in iOS.
 * 4. Correct `font` properties and `color` not being inherited.
 * 5. Remove default style in iOS.
 * 6. Style
 */
.uk-search-field {
  /* 1 */
  box-sizing: border-box;
  /* 2 */
  margin: 0;
  /* 3 */
  border-radius: 0;
  /* 4 */
  font: inherit;
  color: #666666;
  /* 5 */
  -webkit-appearance: none;
  /* 6 */
  width: 30px;
  height: 40px;
  padding: 0 0 0 30px;
  border: 1px solid rgba(0, 0, 0, 0);
  background: rgba(0, 0, 0, 0);
  -webkit-transition: all 0.2s linear;
  transition: all 0.2s linear;
  vertical-align: middle;
  position: relative;
  z-index: 1;
  cursor: pointer;
  text-align: right;
}
/* Placeholder */
.uk-search-field:-ms-input-placeholder {
  color: rgba(0, 0, 0, 0)!important;
}
.uk-search-field::-moz-placeholder {
  color: rgba(0, 0, 0, 0);
}
.uk-search-field::-webkit-input-placeholder {
  color: rgba(0, 0, 0, 0);
}
/* Focus */
.uk-search-field:focus {
  outline: 0;
}
/* Focus + Active */
.uk-search-field:focus,
.uk-search.uk-active .uk-search-field {
  width: 100px;
}
/* Dropdown modifier: `uk-dropdown-search`
 ========================================================================== */
.uk-dropdown-search {
  width: 300px;
  margin-top: 0;
  background: #ffffff;
  color: #666666;
}
.uk-open > .uk-dropdown-search {
  -webkit-animation: uk-slide-top-fixed 0.2s ease-in-out;
  animation: uk-slide-top-fixed 0.2s ease-in-out;
}
/*
 * Dependency `uk-navbar-flip`
 */
.uk-navbar-flip .uk-dropdown-search {
  margin-top: 5px;
  margin-right: -15px;
}
/* Nav modifier `uk-nav-search`
 ========================================================================== */
/*
 * Items
 */
.uk-nav-search > li > a {
  color: #666666;
}
.uk-nav-search > li > a:hover {
  background: #f6f6f6;
}
/*
 * Active
 * 1. Remove default focus style
 */
.uk-nav-search > li.uk-active > a {
  background: #f6f6f6;
  color: #666666;
  /* 1 */
  outline: none;
}
/*
 * Sub-object: `uk-nav-header`
 */
.uk-nav-search .uk-nav-header {
  color: #5d5d5d;
}
/*
 * Sub-object: `uk-nav-divider`
 */
.uk-nav-search .uk-nav-divider {
  border-top: 1px solid rgba(120, 121, 122, 0.15);
}
/*
 * Nested items
 */
.uk-nav-search ul a {
  color: #cccccc;
}
.uk-nav-search ul a:hover {
  color: #5d5d5d;
}
/* Search in offcanvas
 ========================================================================== */
.uk-offcanvas .uk-search {
  display: block;
  margin: 20px 0;
}
.uk-offcanvas .uk-search:before {
  color: #666666;
}
.uk-offcanvas .uk-search-field {
  width: 100%;
  border-color: rgba(0, 0, 0, 0);
  background: #f6f6f6;
  color: #666666;
}
.uk-offcanvas .uk-search-field:focus {
  background: rgba(0, 0, 0, 0);
  box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.3);
}
.uk-offcanvas .uk-search-field:-ms-input-placeholder {
  color: rgba(0, 0, 0, 0)!important;
}
.uk-offcanvas .uk-search-field::-moz-placeholder {
  color: rgba(0, 0, 0, 0);
}
.uk-offcanvas .uk-search-field::-webkit-input-placeholder {
  color: rgba(0, 0, 0, 0);
}
.uk-nav-search > li:first-child {
  margin-top: -10px;
}
.uk-nav-search > li:last-child {
  margin-bottom: -10px;
}
.uk-navbar .uk-search:before {
  left: auto;
  right: 0;
}
.uk-navbar .uk-search-field {
  padding: 0 30px 0 0 !important;
}
.uk-navbar .uk-search-field:focus {
  box-shadow: none;
}
.uk-offcanvas .uk-search {
  margin-top: 0;
}
.uk-offcanvas .uk-search:before {
  z-index: 1000;
  font-size: 16px;
}
.uk-offcanvas .uk-search .uk-search-field {
  text-align: left;
}
.uk-offcanvas .uk-search .uk-search-field:focus {
  padding-left: 30px;
}
*

effrit

  • Легенда
  • 10132
  • 1118 / 13
  • effrit.com
127 сообщений. неужели до сих пор не в курсе, как работает форум?
без ссылки на сайт ничего конкретнее не будет
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Как исправить текст поля поиска?

Автор amor

Ответов: 2
Просмотров: 1545
Последний ответ 27.02.2019, 22:25:23
от voland
Перевод расширенного поиска

Автор dedmazaj

Ответов: 0
Просмотров: 1940
Последний ответ 29.03.2018, 21:56:43
от dedmazaj
Вывод ошибки в всплывающее окно!

Автор qaza

Ответов: 0
Просмотров: 1422
Последний ответ 06.05.2014, 12:02:10
от qaza
Как убрать RU из адресной строки?

Автор lexx006

Ответов: 2
Просмотров: 2280
Последний ответ 09.06.2013, 12:30:12
от NightGuard