Centering elements?

User 111088 Photo


Registered User
5 posts

Not found it yet, but sure someone has :)

I want to center elements within a row so when they flow to a smaller screen they remain centered eg buttons, picture boxes etc. Not seen how to do this (can only see align left/right).

Any advice?
User 379556 Photo


Registered User
1,536 posts

With the element selected, I do it in the Design section at the foot of the Dimensions bar, where I place a tick in both of the Auto boxes.

Frank
User 187934 Photo


Senior Advisor
20,193 posts

Roy Peacock wrote:
Not found it yet, but sure someone has :)

I want to center elements within a row so when they flow to a smaller screen they remain centered eg buttons, picture boxes etc. Not seen how to do this (can only see align left/right).

Any advice?

Set your margin for left and right to auto.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 111088 Photo


Registered User
5 posts

Thanks Frank, that doesnt seem to work for me. For example I have 4 picture boxes that are centered on 700px and above. When I go down to mobile resolutions the first 2 stay centered but the other two then flow onto a different line and are left justified and not centered.
User 2484360 Photo


Registered User
3,293 posts

Roy Peacock wrote:
Thanks Frank, that doesnt seem to work for me. For example I have 4 picture boxes that are centered on 700px and above. When I go down to mobile resolutions the first 2 stay centered but the other two then flow onto a different line and are left justified and not centered.


If you could provide your project file, it would be much easier to provide assistance. :)
User 111088 Photo


Registered User
5 posts

Attached as requested :)
Attachments:
User 2484360 Photo


Registered User
3,293 posts

Roy Peacock wrote:
Attached as requested :)


This is because you did not remove the float, or set the margin auto on those images. :)

Attached is the fixed project.
Attachments:
User 111088 Photo


Registered User
5 posts

Thanks Adam,

Actually I could replicate that - what I wanted were all the picture links (and button links) on one line and when the screen got too small when the flow went onto 2 lines the 2nd line was centered.
User 2484360 Photo


Registered User
3,293 posts

Roy Peacock wrote:
Thanks Adam,

Actually I could replicate that - what I wanted were all the picture links (and button links) on one line and when the screen got too small when the flow went onto 2 lines the 2nd line was centered.


Not sure what you mean by "the flow went onto 2 lines the 2nd line was centered".
User 111088 Photo


Registered User
5 posts

This is pretty much how it shows on a cell (lowres.jpg) compared to desktop. I would have expected that once the picture elements flowed they would have remained centered.
Attachments:

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.