Main menu - cutomization

Is it possible to write a custom css for the main menu component (what are the style attributes to be defined ?)

If I use ElementClassName I can have some properties redefined (font, background ...) but lose some others (hover background ....)



  1. menu style is set via WebMainMenu.Appearance
    2) you could programmatically adapt the built-in generated CSS if you want to customize more than what WebMainMenu.Appearance allows. The main generated CSS classes are 'main-menu' and 'sub-menu'

Many thanks Bruno.


My TMainMenu is into a TWebPanel and using the browser tools I saw that some parts of the style are inherited. So changing the font properties of the TWebPanel "propagated" to the main menu.
Have to take the habit of using the browser F12 key ...

Anyway, how could I have changed at run time the generated main-menu style class ?

How customize items font ?

Hi Guido,

You can modify the item font by adding some css to the unit's HTML file.

Example:

    <style>
    label.drop-label {
      color: red;
      font-weight: bold;
      font-size: 1.2em;
      font-family: Serif;
    }
    </style>