January 22, 201115 yr As the title suggests really, is it possible to somehow use a semi-transparent png as a background to form fields? I've tried with a transparent png set as a background but it just shows up as a solid color instead. The PNG is definitely saved transparent, I can use it somewhere else on the page and it'll be transparent, but not the form field? I'd assumed it's not possible but I'm sure I've seen transparent backgrounds on contact forms around the web. Something like this: Thanks.
January 22, 201115 yr Is the form using a separate CSS file? Edited January 22, 201115 yr by DannyG17
January 22, 201115 yr It's possible. Should be just a case of setting the background image to the semi-transparent png. Make sure you haven't set a background color or that it's set to transparent. Also double check the url of your background image.
January 23, 201115 yr Author It doesn't seem to be working. I've got it very simple: <input name="email" type="text" class="input" value="email" /><br /> .input { background-image:url(../images/trans2.png); width: 960px; } Like I say the transparent png is definitely transparent, I could for example use it for a background in a normal DIV and it'll show as intended, but as above for an input field it just turns solid. Is the form using a separate CSS file? No, single CSS file. Edited January 23, 201115 yr by Killer
January 23, 201115 yr Add this to the CSS. opacity:0.6; The 0.6 I believe stands for 60% visibility therefore 40% transparent. Change the opacity settings to your liking. I added to your code for you: .input { background-image:url(../images/trans2.png); width: 960px; opacity:0.6; } Edited January 23, 201115 yr by DannyG17
Create an account or sign in to comment