Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Transparent backgrounds in forms

Featured Replies

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:

transinput.png

 

Thanks.

Is the form using a separate CSS file?

Edited by DannyG17

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.

  • 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 by Killer

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 by DannyG17

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.