Jump to content

My button styles do not work with Safari


confused and dazed

Recommended Posts

Hello Internet!!! I am back for more questions and I continue to be confused and dazed. Here is the code for my button styles and they do not work with Safari browsers (i.e. iphones ipads, etc...) They seem to default to a rounded button that is gray. The text color appears to be ok with the button should have a background color and should be square. ***this code is in the <head><style type="text/css">.btnmain {background-color:#993300; color:#CC9966; width:258px; height:30px;}.btnmain:hover {color:Black; background: #CC9966; font-style: italic}.centerbtn {background-color:#993300; color:#CC9966; width:274px; height:33px;}.centerbtn:hover {color:Black; background: #CC9966; font-style: italic}</style>***this code is in the <body><input type="button" class="btnmain" style="font-weight: bold; font-family: Century; font-size: 12pt; margin-left: 0px;" value="item1" onclick="Senditem1();">

Link to comment
Share on other sites

Thanks again for responding to my post.I took a look with google and I found two sets of codes that claim to work. I guess I am not integrating the code properly to make either of them work. Can anyone help? OPTION1input, textarea { -webkit-appearance: none; -webkit-border-radius: 0;} OPTION2input[type=submit] { -webkit-border-radius:0px;}

Link to comment
Share on other sites

I ended up putting the code within the style quotes in the input tag. It worked. Guess I should have done that first. Issue solved! <input type="button" class="btnmain" style="-webkit-appearance: none; -webkit-border-radius: 0; font-weight: bold; font-family: Century; font-size: 12pt; margin-left: 0px;" value="item1" onclick="Senditem1();">

Link to comment
Share on other sites

The first should have worked? are you using jquery-mobile, with jquery-mobile-css? these do change styles for mobile devices to those within mobile-css. try this

input {-webkit-appearance: none !important; -webkit-border-radius !important: 0; font-weight: bold; font-family: Century; font-size: 12pt; margin-left: 0px;}

The second option will only target inputs of type submit, NOT button.

Link to comment
Share on other sites

dsonesukOn option#2 understood. On option#1 - I'm still a little confused where to apply that code. If I simply put that line of code in the <body> it ends up displaying those actual words in the browser and not a button at all. If i put that text within tags <input {-webkit-appearance........etc..... it does not render the buttons like I want them - it still defaults to what iphones want them to be... Please explain how and where to apply the code you suggested. Also I actually dont know what you mean by "jquery-mobile, with jquery-mobile-css" I am not using the command jquery anywhere in my code. Please explain what you mean by this statement. I would certainly appreciate it.Thanks as always Last question - do you like my anxiety face? It really fits how I feel most of the time!!!

Link to comment
Share on other sites

Between head tags <head><style type="text/css">input {-webkit-appearance: none !important; -webkit-border-radius !important: 0; font-weight: bold; font-family: Century; font-size: 12pt; margin-left: 0px;}</style></head> Jquery-mobile is specific for mobiles, for swipe etc, it tends to convert inputs to style that matches styling by applying class, then the styling is applied by css to that class using jquery mobile css style sheet.

Edited by dsonesuk
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...