473,761 Members | 10,057 Online
Bytes | Software Development & Data Engineering Community
+ 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 27551
"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.bac kgroundColor='r ed'"
onmouseout = "this.style.bac kgroundColor = ''">
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******@bigNO SPAMpond.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***@sheerhel l.lan> wrote in message
news:hl******** *************** *********@4ax.c om...
....
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***@sheerhel l.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******@bigNO SPAMpond.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
9505
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 control. My control draws a shape (circle, square, rectangle ...)
1
20179
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 I prefer don't insert a background in MyComponent, and using the MyApp one as general background with MyComponent positionned, but I am not able to have MyComponent background transparent.
7
3589
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 to. Thus, when I set White to the transparent color of a Bitmap stored in the Image of a PictureBox and placed the PictureBox on a Form which has a BackColor of black, it turned the white pixels of the bitmap image to black, but these black pixels...
5
6461
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 expert guidance. I just want to load a GIF with a transparent background into a container with a transparent background. So I can move the GIFs over and under each other. You know, as in basic game stuff. I can load the transparent GIF no...
8
10610
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 some controls that aren't rectangular and it won't be pretty if I end up with a grey rectangle behind each one. http://msdn.microsoft.com/library/en-us/vbcon/html/vbtskGivingYourControlTransparentBackground.asp?frame=true
4
2563
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 lblP1JoyRight.BackColor = clrLabelMove
2
7587
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 form are made transparent. What results is the label's backcolor appearing as blocks of 'control' colored background. Setting the label's backcolor to color.transparent does not make it transparent (evidently the text is repainted with a...
9
2116
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;) associated with a selector, it gave me this error message: Line : 30 (Level : 1) You have no background-color with your color : #navlist li a Here's the CSS fragment that it doesn't like:
2
10986
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 documentation has reached an all-time low (please note the part about the z-order): MSDN: In Visual Basic 6.0, the BackStyle property of the Label control determines whether the label had a transparent background. Setting the BackStyle...
8
10176
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 however shows white as the PictureBox moves but I want it to be transparent. The PictureBox BackColor is set to Transparent .. but no affect. I have used PhotoShop to make the image background transparent .. again no affect. If I make the image a...
0
10107
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9945
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9900
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9765
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7324
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3863
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3442
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2733
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.