user2510538
user2510538

Reputation: 3

Image is displaying as button on iOS

I am having an issue with images displaying as buttons (with the title text as the text of the button) in the iPhone 5 browser. I have tried GIF, PNG and JPG file types.. all with the same effect. It is not happening with all images... but one consistence appear to be

Any advise?

Code example:

<a href="/index.php?main_page=checkout_shipping">
<img width="159" height="27" title=" Proceed to Checkout " alt="Proceed to Checkout" src="includes/templates/template_default/buttons/english/button_checkout.jpg">
</a>

Screenshot: enter image description here

Upvotes: 0

Views: 152

Answers (2)

yeyene
yeyene

Reputation: 7380

Try this one. Give an ID to tag and style them with css.

HTML

<a id="checkout" href="/index.php?main_page=checkout_shipping">
    <img width="159" height="27" title=" Proceed to Checkout " alt="Proceed to Checkout" src="includes/templates/template_default/buttons/english/button_checkout.jpg" />
</a>

CSS

a#checkout {
    float:right;
    margin:10px;
    width:159px;
    height:27px;
    text-decoration:none;
    border:none;
    outline:none;
}
a#checkout img{
    float:right;
    width:159px;
    height:27px;
    border:none;
    outline:none;
}

Upvotes: 0

J&#227;o
J&#227;o

Reputation: 469

It seems that the UIWebView is considering your alt as the data, so, dispaying a text instead of the image. Verify if your image really exists in that folder or, try removing the alt from the a href tag o see what happens.

Upvotes: 1

Related Questions