Can't make button left on desktop center on mobile
See original GitHub issueDescribe the bug Hey, I can’t make button left on desktop , center on mobile.
To Reproduce
<mj-head>
<mj-style>
@media only screen and (max-width: 500px) {
.hello {
width: 200px !important;
}
}
@media all and (max-width: 480px) {
.align div {
text-align: center!important;
align: center!important;
}
}
@media all and (min-width: 480px) {
.balign td{
align: left!important;
}
}
</mj-style>
</mj-head>
<mj-body>
<!-- Side image -->
<mj-section background-color="white">
<!-- Left image -->
<mj-column>
<mj-image width="250px" src="http://placekitten.com/200/300" />
</mj-column>
<!-- right paragraph -->
<mj-column>
<mj-text
font-size="28px"
font-family="Roboto,Arial"
color="#008BFF" align="left" padding-top="25px" css-class="align">
<a href="www.wp.pl" style="text-decoration:none"> Lorem Ipsum is </a>
</mj-text>
<mj-text
font-size="16px"
font-family="Roboto,Arial"
color="#18191A" align="left" font-weight="300" line-height="28px" css-class="align">
Lorem Ipsum is simply dummy text of the printing and typesetting industry.
</mj-text>
<mj-text font-size="13px"
font-family="Roboto,Arial"
color="#8894AB" align="left" font-weight="300" line-height="16px" css-class="align" >
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, b</mj-text>
<mj-button font-family="Helvetica" background-color="#303F9F" color="white" padding-top="20px" align="center" width="168px" height="35px" font-size="16px" css-class="balign" >
Read more
</mj-button>
</mj-column>
</mj-section>
</mj-body>
</mjml>``
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Buttons are central on PC but not on phone? - Html/Css
Buttons are central on PC but not on phone? - Html/Css - Stack Overflow. Stack Overflow for Teams – Start collaborating and sharing ......
Read more >How to align items to center on mobile but to the right or left ...
Hi,. I have created a local wordpress site and on each page I have a layout section to the right, with buttons inside...
Read more >Centre Buttons on Mobile only css - Customize with code
I'm needing to centre the buttons on mobile only and can't seem to find ... yes, but changing the alignment affects both mobile...
Read more >Buttons misaligned on mobile device
My Max Buttons display perfectly on a desktop but are slightly left of centre on mobile devices, e.g. see here: https://karenthorburnweddings.com/.
Read more >How do i change the alignment of my button from desktop ...
Hi there, I am trying to change the the alignment of my button from desktop to mobile. On desktop it is currently centered...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@iRyusa @ProdigyMaster
Hi,
It is possible to do it using media queries. Just check this out below. This is working for me.
I agree that this will work only with the clients that support media queries. I am getting a device coverage of 99%+ on EOA as of now with this solution.
But yes, I take your point.