|
CSS used for Transparency/Opacity
|
|
21st August, 21:53
(This post was last modified: 21st August 21:53 by smarteeformee.)
Post: #1
|
|||
|
|||
|
CSS used for Transparency/Opacity
I just thought I'd leave a little note for anyone trying to set opacity on their tooltips. Since there's currently no effect for this in the API (that I could see), you'd want to override this in your CSS declarations. Based on the following structure from the documentation:
JS Code
Your CSS should target the following classes: JS Code
Note: I am only targeting WebKit as my project applies to an Adobe AIR application. For other, non-compliant browsers (cross-browser compliancy), your actual CSS may vary. I add the font-weight:bold there as it makes the text in the tooltips easier to read; again, this may not be necessary for your project. This targets the entire tooltip, setting the proper level of opacity without additional cascading effects messing up the opacity level. I'm not entirely sure how one would target only the content, but not the border (as the content area itself seems to set a matching border width to the right and left of the content DIV). |
|||
|
22nd August, 13:46
Post: #2
|
|||
|
|||
|
CSS used for Transparency/Opacity
Nice tutorials BrendonKoz. Useful tip for those wanting a set opacity and just for clarities sake, heres a modified code to make the opacity cross browser (including IE6-8):
JS Code
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
9th October, 04:30
Post: #3
|
|||
|
|||
|
CSS used for Transparency/Opacity
This does not seem to work very nicely. The opacity only works in 1 browser with the CSS given above (the cross browser one) and that is Firefox (or any browser that supports the opacity CSS). IE seems to require its filter attributes be set at the top of the style. Firefox seems to want the same with the opacity attribute.
I am sure I must be missing something here so any help on that point would be appreciated. Also I found that I didn't need to define all those styles and it works fine if I just use .qtip { ... }. Here is what I am currently using: JS Code
This seems to work except for 1 slight problem. In IE the tooltips fade in to full (no opacity) and then jump to their opacity setting; is there any way to have them only fade to the specified opacity? (this happens correctly in Firefox). |
|||
|
11th October, 00:40
Post: #4
|
|||
|
|||
|
CSS used for Transparency/Opacity
Simon, unfortunately at the moment there isn't a way to specifying a definitive opacity fade-to setting natively. You can try editing the library code directly to solve your problem, possibly by editing the 'show' API function and replacing the 'fadeIn' to an animate statement with a set opacity?
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
12th October, 04:09
(This post was last modified: 12th October 04:12 by gdhanasekar.)
Post: #5
|
|||
|
|||
|
CSS used for Transparency/Opacity
Thanks craig. I gave the custom animation a shot but am having a few problems. I have it now so that it works and fades to the correct opacity except on the very first time you hover over the target. The first time it doesn't seem to do the animation at all, it just suddenly appears (no fade in) and then changes to the correct opacity. So it flashes black (in my case) and then switches instantly to 0.75 opacity.
Here is the code I have changed - it is kind of strange and I'm hoping you can help me since you probably know the inner workings of your own code and jquery better than me. I am using fadeTo, but this doesn't seem to 'show' the tooltip like fadeIn does so I had to add the extra show. This also caused a problem where (in IE8) the tooltip would be sliding upwards, as if moving to the correct position, as it was fading in. This is why I added the callback function to do the fadeTo. To show the tooltip: JS Code
To hide the tooltip: JS Code
I had to add the hide in the fade code because otherwise the tooltip could only be shown once, after the first fade it would never come back if you hovered over the target again. Also setting the opacity to 0.75 (what I thought it should have been anyway) was required otherwise the tooltip jumped back to opacity 1 before fading out. Any help would be appreciated! |
|||
|
12th October, 04:19
Post: #6
|
|||
|
|||
|
CSS used for Transparency/Opacity
Just thought I would also mention that this all works fine in Firefox and, funnily enough, IE7 (well IE8 in IE7 mode). Its only IE8 in standards mode that this is a problem.
Also I just tested to see if turning prerendering on made any difference and unfortunately it didn't
|
|||
|
13th October, 21:39
Post: #7
|
|||
|
|||
|
CSS used for Transparency/Opacity
Simon, I've seen quite a few sites use the above code and it appeared to work flawlessly even in IE6. Do you have a test page we can look at to demonstrate?
Craig Thompson Web Developer / Designer Craigsworks http://www.craigsworks.com |
|||
|
18th November, 19:53
Post: #8
|
|||
|
|||
CSS used for Transparency/Opacity
craig Wrote:Simon, I've seen quite a few sites use the above code and it appeared to work flawlessly even in IE6. Do you have a test page we can look at to demonstrate?The CSS works fine, but there is one problem. Text becomes opaque as well. Is there any way to simply use a PNG with transparency to achieve the same effect without affecting the contents of the tooltip? Thanks, Stephen |
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| qtip-content background in CSS | interpotential | 4 | 2,666 |
25th August 18:48 Last Post: interpotential |
|
| Custom graphics/css for the tooltip looks | SuneR | 1 | 1,708 |
21st December 10:44 Last Post: Craig |
|
| how can i use qtip corner as seperate pure css? | jimmy | 6 | 2,825 |
24th November 12:38 Last Post: jimmy |
|
| qTips with jQuery UI CSS and ThemeRoller | dfeeney | 3 | 3,272 |
5th May 12:24 Last Post: tipolosco |
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Calendar
Help




