Solved

Custom CSS Question

  • 7 September 2018
  • 2 replies
  • 7 views

Badge +8

Hi All

I need a CSS "guru" to answer me a simple question

I have a view which I've put onto a form and then applying the "Lithium" theme, the form is set to width of 500px

By default the view is being aligned to the centre of the form but I require it to be left algined

I dont see how it can be done through the designer so I'm guessing custom CSS is the answer

I've had a good look to try and find the correct CSS but no luck

 

Can anyone help?

 

15729i101693897C72CEE7.pngthanks

Paul

icon

Best answer by RaymondJVR 10 September 2018, 09:35

View original

2 replies

Userlevel 4
Badge +13

Good Day Psturmey


 


I had a look at this and noticed that if a different control is added on the side to which you wanted the view to be alignend to, then the view will not be aligned to that side as the form has to accomodate for the control on that side which will automatically align the view to the center, should there only ba a control on the views left side.


 


I preformed three tests to confirm this behavior. Please see the image below for a visual of the tests preformed.


Test 1:


If you add a view to the form while the views width is set to 500px the view will automatically be aligned to the left hand side. Keeping in mind this would only be the case if the view is present in its own line or in other words if no other controls are placed next to the view on the form.


 


Test 2:


if you add a view to the form while the views width is set to 500px, then add a control on the left hand side of the view, the view will automatically be aligned to the right hand side as the form has to now accomodate two control in one line.


 


Test 3:


If you add a view to the form while the views width is set to 500px and you decided to add a contol on the left and right hand side of the view then the view will be aligned to the center as the form will have to accomodate three control in one line.


 


 


Recommentdation:


With this explained my recomendation would be to ensure that there is not a controls on the left hand side of your view present in the form on the same line, if there is move the control to a differnet location on the form and your view should align to the left hand side. 


 


Kidn Regards


Raymond


 


 

Badge +8

thanks Raymond, your explanation solved my issue

Reply