Hello guys, i am new to programming i want to mote down button in vertical order, this i my code:
@page "/Login"
<RadzenButton Click=@(args => OnClick ("Button with text")) Text="1" Style="margin-bottom:-100px;width:70px; height:50px " />
<RadzenButton Click=@(args => OnClick("Button with text")) Text="2" Style="margin-bottom:20px;width:70px; height: 50px " />
@code {
void OnClick(string buttonName)
{
Console.WriteLine($"{buttonName} clicked");
}
}
korchev
September 29, 2021, 2:19pm
2
Hi @Bboyarem ,
Try setting the margin-top
instead of margin-bottom
(and use a positive value). Margin bottom will have the opposite effect.
<RadzeButton style="margin-top: 20px; width: 70px; height: 50px" />
Did not help sadly, i want to do pin sign in so need tohave the buttons vertical also
korchev
September 30, 2021, 9:27am
4
What do you want to do? Show us a screenshot of the current and desired behavior.
I want to create something like this, in the picture you can see that 7,4 and 1 are vertical, thats the problem i am facing , my button are only beside each other
korchev
September 30, 2021, 1:12pm
6
There are many ways to do that. Probably the easiest is to put every row of buttons in its own <div>
:
<div style="margin-bottom: 10px">
<RadzenButton Text="7" />
<RadzenButton Text="8" />
</div>
<div>
<RadzenButton Text="4" /><RadzenButton Text="5" />
</div>
Thank you for the quick replay, that solved my problem