Basics
For controlling "cellpadding" in CSS, you can simply use padding
on table cells. E.g. for 10px of "cellpadding":
td {
padding: 10px;
}
For "cellspacing", you can apply the border-spacing
CSS property to your table. E.g. for 10px of "cellspacing":
table {
border-spacing: 10px;
border-collapse: separate;
}
This property will even allow separate horizontal and vertical spacing, something you couldn't do with old-school "cellspacing".
Issues in IE ≤ 7
This will work in almost all popular browsers except for Internet Explorer up through Internet Explorer 7, where you're almost out of luck. I say "almost" because these browsers still support the border-collapse
property, which merges the borders of adjoining table cells. If you're trying to eliminate cellspacing (that is, cellspacing="0"
) then border-collapse:collapse
should have the same effect: no space between table cells. This support is buggy, though, as it does not override an existing cellspacing
HTML attribute on the table element.
In short: for non-Internet Explorer 5-7 browsers, border-spacing
handles you. For Internet Explorer, if your situation is just right (you want 0 cellspacing and your table doesn't have it defined already), you can use border-collapse:collapse
.
table {
border-spacing: 0;
border-collapse: collapse;
}
Note: For a great overview of CSS properties that one can apply to tables and for which browsers, see this fantastic Quirksmode page.
Either use a semi-transparent PNG or SVG image or use CSS:
background-color: rgba(255, 0, 0, 0.5);
Here's an article from css3.info, Opacity, RGBA and compromise (2007-06-03).
<p style="background-color: rgba(255, 0, 0, 0.5);">
<span>Hello, World!</span>
</p>
Best Answer
Here is how I got it working.
Using a plugin
I have downloaded Eclipse UI Themes plugin as described here (direct link to an archive). But instead of extracting it into
dropins
directory, I extracted it intoplugins
. Also I changed its permissions to allow everyone to modify its files.At this point you have:
juno.css
file is what you want. After launching Eclipse, this theme will be available under Appearance -> Dark Juno.Without a plugin
After looking into
plugin.xml
, I had an idea how to create a new theme without using any plugin.One can add
org.eclipse.e4.ui.css.swt.theme
extension point to an existing plugin, sayorg.eclipse.platform_4.2.0.v201206081400
. Moreover, itsplugin.xml
already have this extension point, and the only thing you have to do is to add an appropriatetheme
. Please note, that it must have a uniqueid
.A new CSS file can be placed into the
css
directory, which already contains the default set of themes.After restarting Eclipse with
-clean
option you will see a newly created item in the list of all themes:UPD. 1
For my installation it seems that changes to CSS apply on Eclipse restarting (File -> Restart, or just quitting and starting it manually).
The only weird behavior I have noticed is that CSS files from
~/.e4css
directory (if any exists) override thus ones from the plugin directory. I'm not sure where it comes from, but I can safely remove any files from it. I also don't know this directory even exists on non-Linux systems, but if it does, I guess it should be located somewhere in a home directory of the user, or maybe inDocuments
.UPD. 2
I just tried to add a new theme from scratch and noticed that there was a small mistake in the XML above. In order to get a new theme properly registered it must have a unique
id
attribute. Otherwise you will get an error:And it seems that I were not right saying just restarting Eclipse to register a new theme is enough. However,
eclipse -clean
does the trick.