Margin setting in NG Client less file

Forum to discuss the new web client version of Servoy.

Margin setting in NG Client less file

Postby dev-ws-011 » Tue Oct 13, 2020 8:17 am

Hi All,

I am working in NG Desktop client. I have set the margin in less file, but only margin-top and margin-left is working while margin-bottom and margin-right does not have any effect.

When margin-left and margin-bottom is applied, field get moved resulting in some part is cut (as shown in screenshot).

My style defined in less file is:
Code: Select all
.svy-field
{
   text-align: left;
   margin-bottom: 3px;
   margin-left: 3px;
   margin-right: 3px;
   font-weight: normal;
}


Any help is highly appreciated.

Regards
You do not have the required permissions to view the files attached to this post.
Last edited by dev-ws-011 on Tue Oct 13, 2020 4:13 pm, edited 1 time in total.
Servoy Developer
dev-ws-011
 
Posts: 73
Joined: Fri Oct 21, 2016 8:23 am

Re: Margin setting in NG Client less file

Postby jcompagner » Tue Oct 13, 2020 8:49 am

ngdesktop is just a wrapper around chromium
So see you the same thing in chrome? And if so inspect with the developer tools what really is happening (i think you can do the same in ngdesktop launched from the developer, the menu allows you to open up the developer tools)
Then you should be able to see what is applied and what is really happening css wise.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8829
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Margin setting in NG Client less file

Postby dev-ws-011 » Tue Oct 13, 2020 4:12 pm

Yes, I have used Developer tool to inspect what is being implemented. and I have applied different margins at runtime using inspect tool, but I have observed that margin-bottom and margin-right does not produce effect on fields while margin-top and margin-left do produce effect.

Regards
Servoy Developer
dev-ws-011
 
Posts: 73
Joined: Fri Oct 21, 2016 8:23 am

Re: Margin setting in NG Client less file

Postby kwpsd » Tue Oct 13, 2020 7:54 pm

Perhaps, you should be using padding instead of margins. See the CSS box style here:

https://i.stack.imgur.com/E7RGt.png

I hope this helps!
Kim W. Premuda
San Diego, CA USA
User avatar
kwpsd
 
Posts: 687
Joined: Sat Jul 28, 2007 6:59 pm
Location: San Diego, CA USA

Re: Margin setting in NG Client less file

Postby dev-ws-011 » Wed Oct 14, 2020 8:14 am

Thanks Kim.

I will try using padding. Probably I need to mark this as important so it may not overridden at any level.

Regards.
Servoy Developer
dev-ws-011
 
Posts: 73
Joined: Fri Oct 21, 2016 8:23 am


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 6 guests