Footer: Colour & Positioning #266
-
I tried all combinations of this code to:
from nicegui import ui
with ui.footer().style('position: fixed; width: 100%; background-color: #7B2869; color: white;').classes('content-center h-1'):
with ui.row().classes('text-white text-center'):
ui.link('NiceGUI', 'https://nicegui.io/').style('color: white;')
ui.label('Version 1.0')
ui.run() But it does not work. Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
So your code might look as follows: from nicegui import ui
with ui.footer().classes('justify-center'):
ui.link('NiceGUI', 'https://nicegui.io/').classes('!text-white')
ui.label('Version 1.0')
ui.run() |
Beta Was this translation helpful? Give feedback.
-
In 4cf7466 I changed the way we define the initial link color. Now the exclamation mark is not necessary anymore since CSS as well as Tailwind classes can simply overwrite the default class |
Beta Was this translation helpful? Give feedback.
-
Thanks @falkoschindler, this works as required. However, I still need to put the class '!text-white' even after updating my NiceGUI version. Nevertheless, I have a workable solution, and for such a nice python library. Cheers |
Beta Was this translation helpful? Give feedback.
justify-center
.!text-white
. With "!" you set this style as "important". This is necessary because Quasar setcolor: #2196f3!important;
.So your code might look as follows: