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 6862913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:43:07+00:00 2026-05-27T02:43:07+00:00

Basically, I am building a horizontal navigation bar. I have following markup: <ui:style src=../common.css

  • 0

Basically, I am building a horizontal navigation bar. I have following markup:

<ui:style src="../common.css" type="client.resources.HomeResources.Style">
    @external gwt-Anchor;
    .gwt-Anchor {
        text-decoration: none;
    }
</ui:style>
<g:HTMLPanel styleName="navbar">
    <ul>
        <li><g:Anchor ></g:Anchor> |</li>
        <li><g:Anchor ></g:Anchor> |</li>
        <li><g:Anchor ></g:Anchor> |</li>
        <li><g:Anchor ></g:Anchor> |</li>
        <li><g:Anchor ></g:Anchor> |</li>
        <li><g:Anchor ></g:Anchor> |</li>
        <li><g:Anchor ></g:Anchor></li>
    </ul>

common.css has following rules:

ul {
    margin: 0;
    padding: 0;
    text-align: left;
    font-weight: bold;
    line-height: 25px;
}

ul li {
    display: inline;
    text-align: right;
}

ul li a {
    color: #0077C0;
    font-size: 12px;
    margin-right: 15px;
    padding: 4px 0 4px 5px;
    text-decoration: none;
}

ul li a:HOVER {
    color: #F0721C;
}

When using rules as defined above, everything works perfect. The problem is that I have ul elements in other parts of page, so I’ve added div.navbar before each rule like this:

div.navbar ul{}
div.navbar ul li{}
etc...

But those rules are not applied to ul elements inside UI Binder template. What’s wrong with my code?

Here is the generated HTML (normally on one line):

<div class="navbar"><ul>
   <li><a class="gwt-Anchor">Item 1</a> |</li>
   <li><a class="gwt-Anchor">Item 2</a> |</li>
   <li><a class="gwt-Anchor">Item 3</a></li>
</ul></div>

RESOLVED

styleName="navbar" must be styleName="{style.navbar}"

  • 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-27T02:43:07+00:00Added an answer on May 27, 2026 at 2:43 am

    I only ask because you didn’t include this in your example code: have you double checked there is a <div class="navbar"> that wraps the ul?

    Also, if <g:HTMLPanel styleName="navbar"> is generating the div, it is not closed in the code your provided. Maybe you need a </g:HTMLPanel?

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

Sidebar

Related Questions

Basically I have a web app that I'm building on top of an existing
basically I'm building a custom scroll bar that has a table layout inside it.
I'm building a pacman game. Basically, I want to have a map representation of
I'm building a recipe-finder for a new food blog. The design I have basically
I'm currently building a bunch of common use controls which basically just extend the
I'm basically building a simple list, and one of the items in the list
I'm using IIS7 and ASP.NET. Basically building a simple CMS and need to handle
Basically all pages on this site I am building cannot be accessed when the
We are building a configurator application for conveyors. Basically user comes in and picks
I'm building a price estimator form, which uses jQuery to manipulate select menus. Basically,

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.