question on layout #1937
-
Questiondesired layout
bad code I coinedfrom nicegui import ui
with ui.row().classes("gap-10 bg-grey no-wrap").style("width:100%;height:100%"):
with ui.column().classes("w-1/3 gap-25 no-wrap").style("height:100%"):
ui.label("A").classes("h-[calc(33.33%)] bg-red").style("width:100%")
ui.label("B").classes("h-[calc(66.76%)] bg-red").style("width:100%")
with ui.column().classes("w-2/3 gap-20 bg-green no-wrap").style("height:100%"):
ui.label("C").classes("h-1/3 bg-red").style("width:100%")
ui.label("D").classes("h-1/3 bg-red").style("width:100%")
ui.label("E").classes("h-1/3 bg-red").style("width:100%")
ui.run(native=True, title="test") Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Can you pinpoint what exactly does not work? What is your question? |
Beta Was this translation helpful? Give feedback.
-
The 1st pic is what I expected. Please not that the 2 columns live in a row which should be zoomed accodring to the main window The 2nd pic is what I got by code from nicegui import ui
with ui.row().classes("gap-10 bg-grey no-wrap").style("width:100%;height:100%"):
with ui.column().classes("w-1/3 gap-25 no-wrap").style("height:100%"):
ui.label("A").classes("h-[calc(33.33%)] bg-red").style("width:100%")
ui.label("B").classes("h-[calc(66.76%)] bg-red").style("width:100%")
with ui.column().classes("w-2/3 gap-20 bg-green no-wrap").style("height:100%"):
ui.label("C").classes("h-1/3 bg-red").style("width:100%")
ui.label("D").classes("h-1/3 bg-red").style("width:100%")
ui.label("E").classes("h-1/3 bg-red").style("width:100%")
ui.run(native=True, title="test") |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Ok, let's try this:
Notes: