0

I am having difficulty styling the gwt-tree widget.

I have used

.gwt-Tree {
    padding-top: 4px;
    padding-left: 0px;
    font-weight: bold;
    color: #0066CC;
    width: 14.5em !important;
}

.gwt-Tree .gwt-TreeItem {
    padding-left: 0px !important;
    margin-left: -1.5px !important;
    }

But I can still see the padding. Also I want to increase the size of tree item (+) . Any pointers will be hwlpful.

Google search yielded this which didnt work.

.gwt-Tree > div:first-child {
  width: 0px !important;
  height: 0px !important;
  margin: 0px !important;
  padding: 0px !important;
}

.gwt-Tree > div {
        padding: 0px 5px !important;
}

.gwt-Tree > div[hidefocus=true] {

        width: 0px !important;
        height: 0px !important;

        margin: 0px !important;
        padding: 0px !important;
}

Any sort of help will be appreciated. Thanks!

Christian Kuetbach
  • 15,850
  • 5
  • 43
  • 79
Android_enthusiast
  • 863
  • 5
  • 22
  • 41
  • Your padding isn't working because the parent div on a `gwt-TreeItem` has an inline style with padding. The `div` also doesn't have an id. So the `gwt-TreeItem` correctly has no padding-left, but it is still indented due to its *parent*'s padding-left. – Roddy of the Frozen Peas Aug 24 '12 at 21:51
  • Thanks. so hw do I not inherit from parent. Also hw to increae + size? – Android_enthusiast Aug 24 '12 at 22:26
  • You can't select the parent from the child using CSS, I think. You may be able to write a custom JS function. I didn't post as an answer because I wasn't actually sure how to solve your problem. To increase + size you may need to swap out a bigger image and then change the CSS `height` and `width`. – Roddy of the Frozen Peas Aug 24 '12 at 22:29

0 Answers0