Jump to content
  • 0

Ошибка в стиле для input


okunev2
 Share

Question

В дизайне сть такой элемент:

d622a2e2b694.jpg

Пытаюсь верстать, получилось это:

d66609b2cee9.jpg

Вот на странице что:

<div id="search"><input class="search" type="text" name="search_string" value="Поиск" onfocus="java script: if(this.value == 'Поиск') this.value = '';" onblur="java script: if(this.value == '') { this.value = 'Поиск';}"><input type="hidden" name="search_string" value="search_string"><input type="image" src="images/search.jpg"></div>

и сам css:

#search {
position: absolute;
top: 162px;
left: 221px;
width: 12px;
height: 22px;
}

input.search {
width: 172px;
border-top: 1px solid #cecccc;
border-bottom: 1px solid #cecccc;
border-left: 1px solid #cecccc;
font-family: Tahoma;
font-size: 12px;
color: #000000;
text-align: left;
padding-left: 2px;
padding-top: 2px;
padding-bottom: 2px;
}

Что нужно исправить чтобы кнопка поиска была справа от инпута в притык? Спасибо за помощь :D

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

ну вот к примеру чтото типа такого )))

<!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>Untitled Document</title>

<style type="text/css">
div.i {overflow:hidden; _zoom: 1; padding:1px; border: 1px solid #eee;}
div.i img {float:right; width: 16px; height:16px;}
div.i div {margin:0 18px 0 0;}
div.i input {display:block; width:100%;}

</style>
</head>

<body>

<div class="i">
<img src="btn.gif" alt="" />
<div><input name="" type="text" /></div>
</div>

</body>
</html>

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