millerthegorilla
asked on
How to make a treeview transparent
Hi - I have made a simple web part (server control) for sharepoint that has a tree view on it. I have set the web parts background image to an image and want to see the image through the tree view. It happened once but then stopped working.
I have tried setting the backcolor to color.transparent but this doesn't work.
I am using an associated css style sheet and a javascript js file as well if that helps.
I have tried setting the backcolor to color.transparent but this doesn't work.
I am using an associated css style sheet and a javascript js file as well if that helps.
ASKER
Hi - I am trying to use a c# treeview and make its background transparent. Thanks for your help though.
What is the xml for in the code that you submitted? Is it xsl?
What is the xml for in the code that you submitted? Is it xsl?
No, those are the node style attributes in the treeview.
Theoretically if you apply the css class to the treeview then it should make it trasparent, however for the life of me i can't get it to work in the browser...i'll work on it a little more and post back if i find a solution.
Theoretically if you apply the css class to the treeview then it should make it trasparent, however for the life of me i can't get it to work in the browser...i'll work on it a little more and post back if i find a solution.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi - I turned on my pc this morning and went to the site with the treeview and it was working fine?! I didn't change anything and the background was showing through. The only thing that I can think is that it is a bug in the tree view control. I'm loathe to touch it for fear of breaking it. I'd like to implement your suggestion though so I'll create a new version. I'll be back when I've tried it.
ASKER
Hi - I tried it but it doesn't work. It seems that IE (which I've got to use) isn't accepting the filter style. I am using sharepoint designer to edit the css and when I enter 'filter' or any other opacity command sharepoint designer underlines it in red and complains that the 'property is invalid because its not supported by the current schema'. I didn't know stylesheets had schemas. I presume its referring to the schema on the sharepoint master page.
Thanks for your help anyway. Have some points :-)
Thanks for your help anyway. Have some points :-)
you could use this css and apply it to which ever nodes you want to be transparent, not sure about applying it to the images though.
<style type="text/css">
.trans{
filter: alpha(opacity=50);
-moz-opacity: 0.5;
}
</style>
then just apply this class like below
Open in new window