text box transparency?

JavaScript and client side scripting.

Moderator: General Moderators

malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

text box transparency?

Post by malcolmboston »

was just wondering if this is possible, im assuming it can be done with flash but is there an HTML "version" utilising CSS properties?

im not after a completely transparent (might as well be a hidden field) but rather say 30% transparency so i blends in with my page

.......................................?
Mal
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Yes, it certaily can!!!

I'll put together a little example for ya.

Gimme 10 mins

Mark
phait
Forum Commoner
Posts: 46
Joined: Wed Apr 07, 2004 4:41 am
Location: watford / leicester, UK

Post by phait »

malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

Bech100 wrote:Yes, it certaily can!!!

I'll put together a little example for ya.

Gimme 10 mins

Mark
roflmao, ok bech calm down,

hehe

btw its not a multi-liner its a standard password box <input>
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

here ya go

http://www.infinit-e.com/teststuff/transp.php

Just click update invoice numbers AFTER the large background image has loaded.

Mark
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

thats been achieved through CSS right? because it certainly isnt a HTML attribute

what level of CSS is it at for compliancy? CSS2.0?

source please :lol:
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

malcolmboston wrote:source please :lol:
View > Source :)

Yeah, tis CSS. I have tried it on a number of Platforms, OS's and browser and seems to be okay, but i really am no expert when it comes to CSS.

Someone else may no of compatability issues!?

Mark
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

ah, bloody javascript

im assuming this is the attribute.....

Code: Select all

<!-- CSS -->
filter:alpha(opacity=90);
                    -moz-opacity:90%;
??
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

yeah, thats for changing the opacity
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

what does this mean

-moz-opacity:90%;

i was messing around with CSS opacity attributes this morning, and never noticed -moz- is it some form of workaround for mozilla or something?
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

-moz-opacity: XX%
is for older versions of mozilla. I don't remember which version, but they changed it to:

Code: Select all

-moz-opacity: .XX
at some point for newer ones.
Draco_03
Forum Regular
Posts: 577
Joined: Fri Aug 15, 2003 12:25 pm
Location: Montreal, Canada

Post by Draco_03 »

yep that mans you have to put it in decimal not in %
ex : 50% = .5
User avatar
vigge89
Forum Regular
Posts: 875
Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden

Post by vigge89 »

hmm, can't see any opacity under Firefox 0.8 (Windows XP Home OS)
ast3r3x
Forum Commoner
Posts: 95
Joined: Thu Aug 19, 2004 8:36 pm

Post by ast3r3x »

Sorry to bring up such a dead thread, but I was hoping somebody could expand on this idea for me.

I know how to make something transparent, but is there anyway to make it's child elements not transparent?

What I want...

<div 50% trans>
<div 20%></div>
</div>

what I get...

<div 50% trans>
<div 20%*50%></div>
</div>

Is there anyway to NOT have this happen? I understand why it's happening, but...well it may cause me to pursue a life of drugs and violence. Sure the drugs are ok, but I'm a pretty peaceful guy.
Post Reply