html form image,css - HTML form within an image - Stack Overflow

The obvious answer is to have the jpeg image as the background of the element that contains the form fields.

CSS:

.myformbox {

background-image:url(myimage.jpg);

height:100px; /*or whatever the height of the image is*/

width:100px; /*ditto*/

}

HTML:

....input fields here....

...or something like that.

I note your edit which says "image should be in full dimensions". That is still ambiguous language: do you mean "the box needs to be the full size of the image", or "the image needs to scale to the size of the box"?

For the first of those, see above, where I've added height and width parameters to the CSS.

For the second one however, you have a problem, which is that background image scaling isn't currently supported by CSS (yet!). Solutions to this are a bit more complex, but if this is the question you're asking, here is a page that might help.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值