Link inside of input tag
来源:互联网 发布:思迅软件多少钱 编辑:程序博客网 时间:2024/05/22 10:33
http://stackoverflow.com/questions/6959484/link-inside-of-input-tag
You have two options.
- Place the image as a background of the input, but this won't be clickable.
- Absolutely position the element over an input.
1:
.myInput { background:url(path/to/img.jpg) 5px 5px no-repeat; }
2:
HTML
<div class="inputContainer"> <input class="myInput" type="text" name="myInput" id="myInput" /> <a href="#" class="inputImg"><img src="#" /></a></div>
CSS
.inputContainer { position:relative; }.myInput { padding-left:25px; /* This will move the text from under the image */ } .inputImg { left:5px; position:absolute; top:5px; z-index:5; }
You'll need to play with the position and values depending on your input size, image size and general placement, but that should do what you want.
0 0
- Link inside of input tag
- Control 'ctl00_Menu1' of type 'Menu' must be placed inside a form tag with runat=server.
- Control 'GridView1' of type 'GridView' must be placed inside a form tag with runat=server
- HTML link Tag
- Control 'GridView1' of type 'GridView' must be placed inside a form tag with runat=server 錯誤的解決辦法
- HTML input Tag
- note of inside win2k
- Inside of Stagefright
- Inside of Jemalloc
- Unterminated <html:link tag
- 连接mysql报Communication link failure: java.io.IOException, underlying cause: Unexpected end of input s
- A tag of infinite
- tag of my life
- Invalid location of tag
- Invalid location of tag
- Multiple params with html:link tag
- j-tag 和j-link 关系
- j-tag 和j-link 关系
- android Dialog 自定义 实现xml
- <数据结构> 实验二 线性表的实验之二
- Android开发书籍推荐
- C++函数重载
- Python 检查数组元素是否存在 类PHP isset()
- Link inside of input tag
- C++函数模板template
- 非递归的二叉搜索树的中序遍历
- date命令的帮助信息
- Ubuntu 下Mysql常用命令
- Change placeholder text without jQuery
- 什么是Spring
- 查询oracle中所有用户信息
- JSONObject用法