Serenity: Line break and in the right position

Created on 14 Aug 2019  路  6Comments  路  Source: serenity-is/Serenity

I modified a form with css properties like this :

    [HalfWidth, FormCssClass("line-break-sm")]
    public Decimal SubTotal { get; set; }

image

then,
how to put forms with break and in the right position as like below?
image

Most helpful comment

You can use bootstrap css classes to control the position.
This is how I did in my previous project.

[CssClass("col-md-6 col-md-offset-6")]
public Decimal SubTotal { get; set; }
[CssClass("col-md-6 col-md-offset-6")]
public Decimal Tax { get; set; }
[CssClass("col-md-6 col-md-offset-6")]
public Decimal Shipping { get; set; }
[CssClass("col-md-6 col-md-offset-6")]
public Decimal Discount { get; set; }
[CssClass("col-md-6 col-md-offset-6")]
public Decimal Total { get; set; }

Image 1

All 6 comments

Hi, you can put before each field :

    [HalfWidth]
    [DisplayName(""), LabelWidth(0)]
    [StaticTextBlock()]
    public String StaticText0 { get; set; }

in the form.cs.

Best Regards.
Roberto

You can use bootstrap css classes to control the position.
This is how I did in my previous project.

[CssClass("col-md-6 col-md-offset-6")]
public Decimal SubTotal { get; set; }
[CssClass("col-md-6 col-md-offset-6")]
public Decimal Tax { get; set; }
[CssClass("col-md-6 col-md-offset-6")]
public Decimal Shipping { get; set; }
[CssClass("col-md-6 col-md-offset-6")]
public Decimal Discount { get; set; }
[CssClass("col-md-6 col-md-offset-6")]
public Decimal Total { get; set; }

Image 1

Hi, you can put before each field :

    [HalfWidth]
    [DisplayName(""), LabelWidth(0)]
    [StaticTextBlock()]
    public String StaticText0 { get; set; }

in the form.cs.

Best Regards.
Roberto

thank you @rcruzfalcon but I got an error because the form unavailable in row.

image

You can use bootstrap css classes to control the position.
This is how I did in my previous project.

[CssClass("col-md-6 col-md-offset-6")]
public Decimal SubTotal { get; set; }
[CssClass("col-md-6 col-md-offset-6")]
public Decimal Tax { get; set; }
[CssClass("col-md-6 col-md-offset-6")]
public Decimal Shipping { get; set; }
[CssClass("col-md-6 col-md-offset-6")]
public Decimal Discount { get; set; }
[CssClass("col-md-6 col-md-offset-6")]
public Decimal Total { get; set; }

Image 1

thank you, It's so usefull,and just solved .

very helpful post - quick question - how did you get the text in the subtotal, tax etc to align right within the field?

very helpful post - quick question - how did you get the text in the subtotal, tax etc to align right within the field?

apply text-align: right; to the .s-DecimalEditor in your css file.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moostafaa picture moostafaa  路  3Comments

JohnRanger picture JohnRanger  路  3Comments

Amitloh picture Amitloh  路  3Comments

Pinellus picture Pinellus  路  3Comments

stepankurdylo picture stepankurdylo  路  3Comments