473,473 Members | 1,782 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Transparent Background-Colour

Hi,

my problem: I have some tables with transparent backgrounds, which are
changed in colours within a JavaScript DOM function to have a roll-over
effect.

Now, i can't get them back transparent when leaving the mouse out of the
rollover-box - background-color: none; seems not to work.

Isn't it possible to do this with CSS?
Greetings, Thomas

Jul 20 '05 #1
7 27505
"Thomas Wieser" <we***********@gmx.net> wrote in message
news:bh************@ID-202437.news.uni-berlin.de...
.....
my problem: I have some tables with transparent backgrounds, which are
changed in colours within a JavaScript DOM function to have a roll-over
effect.

Now, i can't get them back transparent when leaving the mouse out of the
rollover-box - background-color: none; seems not to work.


Have you considered using background-image instead?

You could use a 1x1 pixel colored gif or png
for your colors, and a similar transparent one
for 'see-through'.

[ I don't know if there is a way of doing it with
background-color ]

HTH

--
Andrew Thompson
http://www.lensescapes.com/
http://www.physci.org/
http://www.1point1c.org/

Jul 20 '05 #2
Fox


Thomas Wieser wrote:

Hi,

my problem: I have some tables with transparent backgrounds, which are
changed in colours within a JavaScript DOM function to have a roll-over
effect.

Now, i can't get them back transparent when leaving the mouse out of the
rollover-box - background-color: none; seems not to work.

Isn't it possible to do this with CSS?
If you do this with javascript (onmouseover/onmouseout attributes in
table tags), just set the backgroundColor to an empty string:

<table onmouseover = "this.style.backgroundColor='red'"
onmouseout = "this.style.backgroundColor = ''">
Greetings, Thomas

Jul 20 '05 #3
Thomas Wieser <we***********@gmx.net> writes:
my problem: I have some tables with transparent backgrounds, which are
changed in colours within a JavaScript DOM function to have a
roll-over effect.

Now, i can't get them back transparent when leaving the mouse out of
the rollover-box - background-color: none; seems not to work.
Try background-color: transparent; - there isn't a background-color: none;
Isn't it possible to do this with CSS?


table { background-color: transparent; }
table:hover { background-color: red; }

Browser support will vary - certainly older browsers only tended to
support :hover on <a>.

--
Chris
Jul 20 '05 #4
Thomas Wieser wrote:
Hi,

my problem: I have some tables with transparent backgrounds, which are
changed in colours within a JavaScript DOM function to have a roll-over
effect.

Now, i can't get them back transparent when leaving the mouse out of the
rollover-box - background-color: none; seems not to work.


'none' is not a valid value for background-color. Why not try
'transparent' if you want the background to be transparent?
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)

Jul 20 '05 #5
Tim
"Thomas Wieser" <we***********@gmx.net> wrote
my problem: I have some tables with transparent backgrounds, which are
changed in colours within a JavaScript DOM function to have a roll-over
effect.

Now, i can't get them back transparent when leaving the mouse out of the
rollover-box - background-color: none; seems not to work.


On Mon, 11 Aug 2003 06:51:28 GMT,
"Andrew Thompson" <an******@bigNOSPAMpond.com> wrote:
Have you considered using background-image instead?

You could use a 1x1 pixel colored gif or png
for your colors, and a similar transparent one
for 'see-through'.

[ I don't know if there is a way of doing it with
background-color ]


Is it any wonder that we have so many bad websites, when instead of
checking if something can be done (like reading the publicly available
CSS specifications), a convoluted and daft solution is done, instead?

CSS was designed to get away from doing daft tricks with images, to
achieve the desired results, directly. But we still have people using
CSS to do the same stupid trick in yet another way.

There's things like "background-image: none" which could ensure that no
preset background image is used, anymore. And "background-color:
transparent" to get transparent (sic) colours.

Anybody authoring for the web should really read the HTML and CSS
specifications. Even if they only read the preambles, and the technical
bits directly related to what they're trying to do, rather than the
whole lot. Anybody who says that they can't understand the specs,
probably doesn't have the nouse to understand what they're doing when
they're authoring, either.

Why play with technical things, if you don't have a technical bent.
Please don't get interested in first aid, we don't need people
practising things without proper knowledge.

--

I'm sick of seeing too many stupid things over the last few days...

--
My "from" address is totally fake. The reply-to address is real, but
may be only temporary. Reply to usenet postings in the same place as
you read the message you're replying to.
Jul 20 '05 #6

"Tim" <ad***@sheerhell.lan> wrote in message
news:hl********************************@4ax.com...
....
Anybody authoring for the web should really read the HTML and CSS
specifications.


And anybody getting snotty about the quality of _my_
answers could at least provide a link to the resource
they were mentioning.

http://www.w3.org/TR/CSS2/ (unless you have a better one)

--
Andrew Thompson
http://www.lensescapes.com/
http://www.physci.org/
http://www.1point1c.org/

Jul 20 '05 #7
Tim
"Tim" <ad***@sheerhell.lan> wrote
Anybody authoring for the web should really read the HTML and CSS
specifications.

On Mon, 11 Aug 2003 23:21:36 GMT,
"Andrew Thompson" <an******@bigNOSPAMpond.com> wrote:
And anybody getting snotty about the quality of _my_
answers could at least provide a link to the resource
they were mentioning.

http://www.w3.org/TR/CSS2/ (unless you have a better one)


See, you found it; and you get to read them for free, too. I can't
believe that those links aren't posted in this news group so repeatedly
that you'd never have encountered, and bookmarked, them before.

Any newcomer not bothering to look for what's a FAQ, doesn't gain a
great deal of sympathy, either.

--
My "from" address is totally fake. The reply-to address is real, but
may be only temporary. Reply to usenet postings in the same place as
you read the message you're replying to.
Jul 20 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Paul Schnitter | last post by:
Update: My custom control is based on the article "Creating Visual Basic .NET controls from scratch" in "Adventures in .NET" on MSDN. It is designed to be a replacement for the VB6 shape...
1
by: Efkas | last post by:
My application have some level : 1. MyButton class with Label inheritance 2. MyComponent as User Control loading and positionning some of MyButtons 3. MyApp loading and positionning MyComponent ...
7
by: Peter Oliphant | last post by:
Using MakeTransparent one can supposedly turn a color used in a Bitmap to transparent. But, it looks to me like all it does it set these pixels to the color BackColor of the Control it's attached...
5
by: Mark Deibert | last post by:
I'm a former VB6 coder. Quit a few years ago. Now I'm back and trying to teach myself VB.NET. I don't remember having this much difficulty learning VB6. I'm totally stuck on something and need your...
8
by: Grahammer | last post by:
Is it possible to set the background of a usercontrol as transparent? I tried setting the background image of the usercontrol to a transparent GIF, but that caused MAJOR problems. I'm making...
4
by: jcrouse | last post by:
I am using the following code to move a label on a form at runtime: If myMousedown = lblP1JoyRight.Name Then If lblP1JoyRight.BackColor.Equals(Color.Transparent) Then bTransCk = True ...
2
by: Dean Slindee | last post by:
It appears that I have two routines that don't play well together! First routine: a form's background is shaded with a gradient color. Second routine: then, the background of all labels on the...
9
by: Rhino | last post by:
I've been updating some CSS today and got one odd error from the validator at http://jigsaw.w3.org/css-validator/. Every time I had 'background: transparent;' (or background-color: transparent;)...
2
by: Martin | last post by:
I've been complaing about the VB2005 Help-Information (or rather the lack of it) before, but when I was looking how to set the backstyle of a label control to "Transparent" I found that the VB2005...
8
by: Brian Ward | last post by:
I am looking for a simple way to set the image transparency in a PictureBox. I have a moving PictureBox containing a graphic image .. moving by incrementing its Left property. The background...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.