Philip Crisp
Posts: 0
Joined: Tue Aug 27, 2013 10:23 am

Positioning issues.

Hi there, im in the final stage of developing my app and am having difficulty with positioning two images, one on each page. I've tried using CSS to position the images at the top of the page and in the center of the page. The aim is to do this so that the image stays positioned in the center of the top of the screen even if you change the screen size. Hope you can help.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Positioning issues.

Hello! You can try to place image inside the Grid component. Could you post CSS code you tried?

Philip Crisp
Posts: 0
Joined: Tue Aug 27, 2013 10:23 am

Positioning issues.

I'd tried:

margin: auto;
margin-left: 50%;
margin-right: 50%;

I've also tried using the padding element and it hasnt worked so far, I'll try the grid solution now.

Philip Crisp
Posts: 0
Joined: Tue Aug 27, 2013 10:23 am

Positioning issues.

The grid approach didn't work. Anything else that you could suggest? I also should have mentioned above that I used those margin elements separately, not all together.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Positioning issues.

Add class for image (for example myImage), create CSS asset and define that class. For example:
code.myImage{
margin: 4px auto !important;
}/code
http://docs.appery.io/documentation/w...

Philip Crisp
Posts: 0
Joined: Tue Aug 27, 2013 10:23 am

Positioning issues.

I've solved the issue!!
I delved into the css source code and changed the margin property there to auto. It seems like this base style sheet was overriding what I was trying to get my custom style sheet to do.

Return to “Issues”