Align center on mobile

Align center on mobile was created by LittleGrizzly

Posted 8 years 3 months ago #31940
First I have to say: I love this component. I´m trying to make an old site suitable to mobile devices, and with so little knowing of html and css it was a pain. I can say you saved me :)
Now I have a little problem. I have an image in a row and a textbox in the next row. On big devices it is nicely centered. Like I wanted to have.


But on smaller devices the textbox isn´t accurate under the image.


The image is aligned to the right, textbox is always aligned to left. Even if I align the image to the left the image and box are aligned nice over each other on small screens. But then the distance between image and text is too big on fullscreen device and that doesn´t look very good.

I´m talking about this site: testserver.grizzly-adams.de/index.php/robbie-bina

I hope someone cpould help me with that issue,

Thanks in advance,
Stephanie
Attachments:

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Align center on mobile

Posted 8 years 3 months ago #31941
Hi

First I have to say: I love this component. I´m trying to make an old site suitable to mobile devices, and with so little knowing of html and css it was a pain. I can say you saved me :)

Cool, I'm happy to read this :)

if you want to support the Page Builder, you can leave a friendly review in the JED :

extensions.joomla.org/extensions/extensi...tion/page-builder-ck

For your problem, you can
1/ set the image to be centered
2/ edit the text block and set
2.1/ margin-left : -100px
2.2/ custom css area, write this :
left: 50%;
position: relative;

This works quite good, the only thing is on large screens the image and text will be separated with a quite large space

CEd

Joomlack Webmaster and Developer

by ced1870
The following user(s) said Thank You: LittleGrizzly

Please Log in or Create an account to join the conversation.

Replied by LittleGrizzly on topic Align center on mobile

Posted 8 years 3 months ago #31942
That doesn´t seem to be the best solution, on smaller devices the text is over the image, on very small screens the text goes out of screen. Like this:



I mean, it´s not a drama if it´s not accurate vertically aligned, but why not having it perfect if I could?

The review at JED will be done, of course.
Attachments:

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Align center on mobile

Posted 8 years 3 months ago #31943
it seems that you missed the "position:relative;" in the custom css area ...

Joomlack Webmaster and Developer

by ced1870

Please Log in or Create an account to join the conversation.

Replied by LittleGrizzly on topic Align center on mobile

Posted 8 years 3 months ago #31944
Nope, is there:
left: 50%;
position: relative;

Please Log in or Create an account to join the conversation.

Replied by ced1870 on topic Align center on mobile

Posted 8 years 3 months ago #31945
ok, remove the line break and write it all on one line like this

left: 50%;position: relative;

this is a "bug" that I have to fix

Joomlack Webmaster and Developer

by ced1870
The following user(s) said Thank You: LittleGrizzly

Please Log in or Create an account to join the conversation.

Time to create page: 0.759 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 370 guests and no members online