Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 675153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:47:12+00:00 2026-05-14T00:47:12+00:00

A GWT tree looks roughly like this: <div class=gwt-Tree> <div style=padding-top: 3px; padding-right: 3px;

  • 0

A GWT tree looks roughly like this:

<div class="gwt-Tree">
    <div style="padding-top: 3px; padding-right: 3px;
                padding-bottom: 3px; margin-left: 0px;
                padding-left: 23px;">
         <div style="display:inline;" class="gwt-TreeItem">
              <table>
                   ...
              </table>
         </div>
    </div>
    <div ...>
    </div>
    ...
</div> 

My question is: how should I change the padding of the individual tree rows? I suppose I could do something along the lines of setting CSS rules for .gwt-Tree > div but that seems hacky. Is there a more elegant way?


Resolution: Apparently there is NOT a more elegant way. Here is what we did, FWIW:

 .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;
 }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:47:12+00:00Added an answer on May 14, 2026 at 12:47 am

    You could do it like this:

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Test</title>
        <style type="text/css">
        .gwt-Tree {background:green;}
        .gwt-Tree div {padding-top: 3px; padding-right: 3px;padding-bottom: 3px; margin-left: 0px;padding-left: 23px;background:gray;}
        .gwt-Tree div .gwt-TreeItem {padding:0;margin:0;background:red;color:#fff;}
        </style> 
    </head>
    <body>
    <div class="gwt-Tree">
        <div>
             <div class="gwt-TreeItem">
                random
             </div>
        </div>
        <div>
             <div class="gwt-TreeItem">
                random
             </div>
        </div>
    </div> 
    </body>
    </html>
    

    Note that .gwt-Tree div will affect all child divs, so you have to reset them back to the style you want with .gwt-Tree div .gwtTreeItem.

    About the “hacky >” you said – > selector is supported in all browsers except for IE6 who won’t recognize it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I create a GWT Tree, and I would like it to be initially displayed
GWT seems like a really nice technology for Java developers who don't like (or
I would like my GWT program to be able to determine whether it's in
Newbie question: As a response to a request, my server returns a Tree-like data
I am using a tree control in my GWT application. The tree has different
any gwt library i can use to create sliding effect like www.beautyoftheweb.com ?
I'm using GWT and UiBinder for my app, and I'm trying to do this
GWT's serializer has limited java.io.Serializable support, but for security reasons there is a whitelist
In GWT, what is the best way to convert a JavaScriptObject overlay type into
Does GWT has LazyPanel .I can not see it .Please let me know .If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.