Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » CSS: 'background-image' does not work
CSS: 'background-image' does not work [message #777944] Wed, 11 January 2012 07:43 Go to next message
c h is currently offline c hFriend
Messages: 4
Registered: February 2011
Location: Wertheim
Junior Member
Hello,

i want to display an background image in a view.

The wiki says:
Button { background-image: some url }

So I create a plain view with a Button (incl. GridData.FILL_BOTH) and the following CSS code:

Button {
	background-color: #FF0000 #00FF00 100%;
	background-image: url('./images/button_bg.png');
	// background-image: url('platform:/plugin/net.my.package/images/button_bg.png');
}


The bg-color will be painted, the image not (both variants). I use Win 7 x86-64 and Eclipse 4.2 M3 with the e4 Tools from e4/updates/0.12-I-builds/.

Any ideas?
Re: CSS: 'background-image' does not work [message #778333 is a reply to message #777944] Thu, 12 January 2012 12:29 Go to previous message
c h is currently offline c hFriend
Messages: 4
Registered: February 2011
Location: Wertheim
Junior Member
Got it:

You have to add a property to the Product-Extension in plugin.xml:
<property
	name="applicationCSSResources"
	value="platform:/plugin/net.my.package/images/">
</property>


And then all images from this directory work as background images in CSS:
Button {
	background-image: url('./button_bg.png');
}

[Updated on: Thu, 12 January 2012 12:29]

Report message to a moderator

Previous Topic:Eclipse Search in e4
Next Topic:Dependency Injection in Abstract Classes
Goto Forum:
  


Current Time: Fri Apr 19 08:21:48 GMT 2024

Powered by FUDForum. Page generated in 0.01727 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top