×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

iPhone browsers (chrome and safari) output different compared to other browsers

iPhone browsers (chrome and safari) output different compared to other browsers

iPhone browsers (chrome and safari) output different compared to other browsers

(OP)
I have made a mobile version of the page and need to center a button over an image.

I used the example given here,
but for some reason the actual iPhone browsers (Chrome and Safari) both showing that the button isn't actually centered like it is in the desktop or ChromeTools.
Even Android browser shows the buttons is centered. Just not browsers in iPhone....

Is there a way to fix it so that both Android and iPhone shows the same result?


RE: iPhone browsers (chrome and safari) output different compared to other browsers

Try adding

CODE -->

-webkit-transform: translate(-50%, -50%); 
to your CSS from the Example

CODE -->

/* Style the button and place it in the middle of the container/image */
.container .btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
*******add it here**********
  background-color: #555;
  color: white;
  font-size: 16px;
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  border-radius: 5px;
} 
Not 100% sure if it helps though.

RE: iPhone browsers (chrome and safari) output different compared to other browsers

(OP)
@wibenji

It works. Thanks :D

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close