Website not displaying correctly on iphone

Discussion in 'HTML & Website Design' started by ahdsan, Jun 29, 2013.

  1. #1
    I have a website that displays correctly on my Samsung young android mobile.
    but it is showing full size on client's iphone.

    the head has the meta tag
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">

    and body starts like below:
    <body>
    <table width="873" align="center">
    <tr>
    <td width="867" height="607" align="left" valign="top"><p><img src="images/header.jpg" width="870" height="118" /></p>


    what can be the problem ? there is no stylesheet to the page.
     
    ahdsan, Jun 29, 2013 IP
  2. hangbowl

    hangbowl Well-Known Member

    Messages:
    228
    Likes Received:
    3
    Best Answers:
    4
    Trophy Points:
    143
    Digital Goods:
    2
    #2
    try to add stylesheet on your site.

    before <body> tag, add this :
    <style>
    .tablewidth {
    width: 873px;
    }
    .colwidth {
    width: 867px;
    }
    @media screen and (max-width:320px){
     
    .tablewidth {
    width: 318px;
    }
    .colwidth {
    width: 312px;
    }
    }
    </style>
    HTML:
    at the body, change with this :
    <body>
    <table class="tablewidth" align="center">
    <tr>
    <td class="colwidth" height="607" align="left" valign="top"><p><img src="images/header.jpg" class="colwidth" height="118" /></p>
    HTML:
     
    Last edited: Jun 30, 2013
    hangbowl, Jun 30, 2013 IP